ParseControl in Dotnetnuke ASP.NET changing onclick to javascript instead of c# method provided, strange behavior
问题 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) { LinkButton lb = (LinkButton)Control; lb.OnClientClick = "LoadPromo"; } Panel1.Controls.Add(myctrl); } protected void LoadPromo(object sender, EventArgs e) { Console.Write(e.ToString()); } now it takes this control: <asp:LinkButton