Hi-
I have a web form that has a link button to allow people to dynamically add more fields (usercontrols to a panel).
Code on the aspx page is:
Code in my .vb file is:
So the form posts back, but in my ispostback conditional, thats where I want to do the form processing... this button should just be adding controls... is there anyway to figure out what control fired the event so that I could just add that as a condition to my ispostback condition?
I have a web form that has a link button to allow people to dynamically add more fields (usercontrols to a panel).
Code on the aspx page is:
Code:
<asp:Button id="AddRoom" onclick="AddRoom_Click" runat="server" Text="Add" CausesValidation="False"></asp:Button>
Code in my .vb file is:
Code:
Sub AddRoom_Click(Sender As Object, e As System.EventArgs)
Dim c1 As System.Web.UI.UserControl
c1 = LoadControl("/bmc/Library/BreakOutRooms.ascx")
c1.ID = "BORooms2"
BreakOutRooms.Controls.Add(c1)
End Sub
So the form posts back, but in my ispostback conditional, thats where I want to do the form processing... this button should just be adding controls... is there anyway to figure out what control fired the event so that I could just add that as a condition to my ispostback condition?
Code:
if page.ispostback then
if linkbutton just fired
do this
else
do the form submit stuff
end if
end if