10 weber Posted January 19, 2011 Share Posted January 19, 2011 Is it possible to add HTML attributes to asp.net controls directly? i.e. as control attributes (<asp:TextBox ID="txt1" pattern="\w{2,}( \w{2,})*" required="required" ...>) instead of using JavaScript (document.getElementById("txt1").setAttribute("pattern","\w{2,}( \w{2,})*");document.getElementById("txt1").setAttribute("required","required");). Link to comment Share on other sites More sharing options...
10 weber Posted February 19, 2011 Author Share Posted February 19, 2011 Anybody?Maybe it could help if I didn't use HTML5 attributes in the example, as in:<asp:TextBox ID="txt1" type="password" style="color:blue;" ...> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.