J
Jeremy McPeak
Good morning. I am having a problem with the TemplateControl.ParseControl()
method. It does parse the string into a control; however, added attributes
are left out of the parsing and make it to the final HTML code. For
example:
ParseControl("<asp:button OnClick="Btn_Click" text='Click here!'
runat='server' />");
Becomes this HTML:
<input type="submit" OnClick="Btn_Click" />
I can somewhat see why this would happen, as onclick is an event of the
browser. However, I need ParseControl() to treat OnClick as the ASP.NET
event, not the browser's DOM. Any suggestions?
method. It does parse the string into a control; however, added attributes
are left out of the parsing and make it to the final HTML code. For
example:
ParseControl("<asp:button OnClick="Btn_Click" text='Click here!'
runat='server' />");
Becomes this HTML:
<input type="submit" OnClick="Btn_Click" />
I can somewhat see why this would happen, as onclick is an event of the
browser. However, I need ParseControl() to treat OnClick as the ASP.NET
event, not the browser's DOM. Any suggestions?