我有一個asp:文本框我的jQuery模板內低於如何驗證的ASP文本框放在jQuery的模板內
<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>
我必須爲它做驗證這樣
<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 the 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 the inputbox" Display="None" ClientValidationFunction="checkSpecialCharacter" />
<ajaxToolkit:ValidatorCalloutExtender runat="Server" ID="vceSpCharacterProjectTypeDescription"
TargetControlID="custvProjectTypeDescription" />
</table>
</div>
其中project_type_templ_tbl東西給是包含模板的表格名稱
thanx提前幫助
觸發由JavaScript驗證爲你的情況下或者您使用尋找一個解決方案服務器端的C#? – sll