Is this a ParseControl bug?

  • Thread starter Thread starter Chris Simeone
  • Start date Start date
C

Chris Simeone

When I use ParseControl in a C# code behind to create a button...

Control c3 = ParseControl("<asp:button id='Button3' text='Btn3'
oncommand='OnButton' commandname='Btn' commandargument='b3'
runat='server' />");

The HTML that's rendered looks like this...

<input type="submit" name="Button3" value="Btn3" id="Button3"
oncommand="OnButton" />


I don't believe the "oncommand..." parameter should be rendered. Is
this a bug in ParseControl?

Thanks,
Chris
 
asp.net control parser alway emits attibutes it knows nothing about, as its
legal in html to assign them.

-- bruce (sqlwork.com)
 
This is likely to ease client side processing. Unrecognized attributes are
made automatically available as a property :

<input MyPropertty="This Message" onClick="alert(this.MyProperty);"> should
show the message stored in the non standard attribute...

Patrice
 
Back
Top