Adds a variable to javascript with the ClientID of any control. You can then access that control in client-side script by using it's server-side name.
If you have a text box called textbox1 and you call the snippet like this:
AddClientIDReference(textbox1);
then textbox1 can be referenced in Javascript like this:
document.getElementById(textbox1);
or jQuery:
$("#" + textbox1);
↧