.net - How to get "name" of a server control just like "ClientID" in javascript? -
i want apply validation through jquery in forms , require "name" attribute of textboxes on form generated asp.net automatically. there way can name of elements in javascript like:
<script> '<%= txt.clientid %>' </script>
i using following type of jquery validation:
$(".selector").validate({ rules: { // simple rule, converted {required:true} name: "required", // compound rule email: { required: true, email: true } } })
you might this...
<script> var textbox = '<%= txt.uniqueid %>'; </script>
or even...
<script> $('#<%= txt.uniqueid %>').doyourthing(); </script>
Comments
Post a Comment