Checking dynamic controls with jquery
2 answers
<%
TextBox tb = new TextBox();
tb.Attributes.Add("data-validateme","true");
Page.Controls.Add(tb);
%>
Which will add HTML5 data attribute.
<input type="text" data-validateme="true" />
JQuery
$(document).ready(function(){
$("*[data-validateme]").change(function(){
alert($(this).val());
});
});
+1
source to share