Wednesday, January 31, 2007

Find a control in javascript (Ajax ASP.Net)

To find a control with id "MyControl" us the function $get. Example:
alert($get("MyControl").id);

2 comments:

Anonymous said...

Pretty useless example

Håkan Canberger said...

Well... Why create an elaborate example just to show something that's really easy. I wrote this because many don't know how easy it is to find a control on the client side in asp.net ajax.
What kind of example were you hoping to find?