G
Guest
Hi,
I have a user control embedded in another user control that is embedded in a
web form
Page.aspx < Module.ascx < ProblemHere.ascx
In ProblemHere.ascx I have a regular <asp:Button and a <asp:LinkButton and
am attempting to raise the Command event when one or both are clicked.
Unfortunately the Command event is not being raised on postback even though
the event handler is wired up. The Page_Load event is raised when either is
clicked and when I debugged Page_Load I found that __EVENTTARGET contains the
ID of the LinkButton when it posts back, so that seems to be working
correctly. I even put the event handler wire up in the Button's and
LinkButton's declaration:
<asp:Button onCommand="btnUpdate_Command"
but that didn't help. Does anyone know why the page would post back and
raise Page_Load but not the Command event? I don't have any Repeaters or
DataBind commands that would erase it on postback either and EnableViewState
= True. Any help would be appreciated! Thanks!
I have a user control embedded in another user control that is embedded in a
web form
Page.aspx < Module.ascx < ProblemHere.ascx
In ProblemHere.ascx I have a regular <asp:Button and a <asp:LinkButton and
am attempting to raise the Command event when one or both are clicked.
Unfortunately the Command event is not being raised on postback even though
the event handler is wired up. The Page_Load event is raised when either is
clicked and when I debugged Page_Load I found that __EVENTTARGET contains the
ID of the LinkButton when it posts back, so that seems to be working
correctly. I even put the event handler wire up in the Button's and
LinkButton's declaration:
<asp:Button onCommand="btnUpdate_Command"
but that didn't help. Does anyone know why the page would post back and
raise Page_Load but not the Command event? I don't have any Repeaters or
DataBind commands that would erase it on postback either and EnableViewState
= True. Any help would be appreciated! Thanks!