dropdownlist onchange squiggly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey all,

<asp:DropDownList id="DropDownList1" runat="server" onchange="Test();">

can someone please tell me why the onchange has a squiggly and if there is a
better way to access the client-side change event for the drop-down list?

The message is saying it's not a valid attribute of the drop down list
element but yet it still works for me?

thanks,
rodchar
 
Hello rodchar
<asp:DropDownList id="DropDownList1" runat="server" onchange="Test();">

can someone please tell me why the onchange has a squiggly and if there is
a
better way to access the client-side change event for the drop-down list?
The message is saying it's not a valid attribute of the drop down list
element but yet it still works for me?
Yes, you catch this message, but looked to the rendered code too?
The point is:
All attributes where not available in the control, throw such a message.
But ASP.NET do render all that attributes AS-IS to the Html Code.
In this point, this is not a fail in any case, but rather a possible
improvement for a future version of Visual Studio :-)

Another way to add "custom" attributes to your control is wrote them in your
codebeside like:
 
this.dropTest.Attributes.Add("onchange", "foo(this.value);");
what's the best way to find all the possible client-side events for any
control?
 
Back
Top