M
Matt Crego
What approaches has anyone found that would allow for
parsing of serverside events when using the
Page.ParseControl method? I currently have the following
snippet in an xsl file:
Login:<br/>
<asp:TextBox ID="userid" Runat="server" /><br/>
<asp:LinkButton ID="login" Runat="server"
OnServerClick="Login_Click" />
When I use the ParseControl method to parse it and add
this to the Page Controls Collection, it works fine, with
the exception of not including the OnServerClick as the
handler for this click event. It is sent to the client.
I have read an article which uses server-side code to look
for specific controls and manually add the event handlers
to each control. I do not know up front what the controls
are called, and which events would fire which handlers, so
this is not really possible to do in the code. Is there a
better or different way to do this?
parsing of serverside events when using the
Page.ParseControl method? I currently have the following
snippet in an xsl file:
Login:<br/>
<asp:TextBox ID="userid" Runat="server" /><br/>
<asp:LinkButton ID="login" Runat="server"
OnServerClick="Login_Click" />
When I use the ParseControl method to parse it and add
this to the Page Controls Collection, it works fine, with
the exception of not including the OnServerClick as the
handler for this click event. It is sent to the client.
I have read an article which uses server-side code to look
for specific controls and manually add the event handlers
to each control. I do not know up front what the controls
are called, and which events would fire which handlers, so
this is not really possible to do in the code. Is there a
better or different way to do this?