Having some strange behavior here. I have some XSLT which generates some html with a few ASP.NET Link Button Controls. I am using dnn 4.9.2
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);
}
now it takes this control:
asp:LinkButton ID="LinkButton2" runat="server" OnClick="LoadPromo" Text="Get your Free 2" /
and changes it to this when I add an event:
<a onclick="LoadPromo;" id="dnn_ctr954_ViewPromotions_LinkButton2" href=" WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("dnn$ctr954$ViewPromotions$LinkButton2", "", true, "", "", false, true))">Get your Free 2 a>
here is what makes it strange, if I put this in my aspx page:
asp:LinkButton ID="test" OnClick="LoadPromo" runat="server">mybutton</asp:LinkButton
Works fine.
Thanks In Advance