Easy JQuery Asp.Net Control Selection


/ Published in: jQuery
Save to your folder(s)

// Taken from :
// http://www.west-wind.com/weblog/posts/42319.aspx


Copy this code and paste it in your HTML
  1. //Include this script into your externatl master js file.
  2. function $$(id, context) {
  3. var el = $("#" + id, context);
  4. if (el.length < 1)
  5. el = $("[id$=_" + id + "]", context);
  6. return el;
  7. }
  8.  
  9.  
  10. // Hence we can easilly use $$ function in order to select and asp.net control.
  11. var username = $$("UserName");
  12. var password = $$("Password");

URL: http://www.west-wind.com/weblog/posts/42319.aspx

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.