Having some strange behavior here. I have some XSLT which generates some html with a few ASP.NET Link Button Controls
String mstring = sw.ToString();
var myctrl = Page.ParseControl(mstring);
foreach (Control Control in myctrl.Controls)
{
if (Control is LinkButton)
{
...
I'm adding a control (linkbutton) dynamically using ParseControl and it's fine except when I specify an event handler.
If I use:
Dim c As Control = ParseControl("<asp:LinkButton id=""btnHide"" runat=""server"" text=""Hide"" OnClick="btnHide_Click" />")
it correctly adds the control to the page but the click event doesn't fire. If ins...
I have written a class library function that parses a string to a control. It takes the current page and uses page.ParseControl to parse the string as a control.
System.Web.UI.Page page = (System.Web.UI.Page) HttpContext.Current.CurrentHandler;
System.Web.UI.Control ctrl = page.ParseControl(str);
It works fine in most scenarios excep...