Quantcast
Channel: EmotiCODE - Snippets and Source Code Search Engine
Viewing all articles
Browse latest Browse all 55

Control ClientID available in JavaScript

$
0
0
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);

Viewing all articles
Browse latest Browse all 55

Trending Articles