c# - how to validate asp textbox placed inside jquery template -


i have asp:textbox inside jquery template given below

<script id="projecttypetemplate" type="text/x-jquery-tmpl">  <tr id="trprojtype">  <td>${lang_id} </td>  <td><input id="${lang_id}" type="text" /> <span class="requiredfieldstar">*</span></td>   <td>${merchant_id}</td>  <td>${lang_id}</td>  <td>${name_lang}</td>  </tr>  </script> 

i have validation this

 <div id = "projtypediv">                                          <table id = "project_type_templ_tbl"     border="1" cellspacing="0" style="width:100%;">                                           <asp:requiredfieldvalidator     id="reqvprojecttypedescription" runat="server" errormessage="enter project type     description"                                                             controltovalidate="id of inputbox" display="none"></asp:requiredfieldvalidator>     <ajaxtoolkit:validatorcalloutextender                                                             runat="server" id="vceprojecttypedescription" targetcontrolid="reqvprojecttypedescription" />                                                      <asp:customvalidator runat="server" id="custvprojecttypedescription" errormessage="enter characters except (<,>,&#,\) in project type description"                                                         controltovalidate="id of inputbox" display="none" clientvalidationfunction="checkspecialcharacter" />                                                      <ajaxtoolkit:validatorcalloutextender runat="server" id="vcespcharacterprojecttypedescription"                                                         targetcontrolid="custvprojecttypedescription" />                                      </table>                                     </div> 

where project_type_templ_tbl name of table contains template

thanx in advance

you can write simple javascript script trigger validators.

move validators need in same validation group adding attribute validationgroup="yourcustomgroupname" , can use js method:

page_clientvalidate(“yourcustomgroupname”)) 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -