首先,我已经看到了关于这个主题的其他线程,我只是想澄清一些我被困在上面的东西。
我有这个文本框控件和必填字段验证器:
<td class="style1">
<asp:TextBox runat="server" ID="txtFirstname"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="rfvFirstname" runat="server" ControlToValidate="txtFirstname" >*</asp:RequiredFieldValidator>
</td>
而这个javascript代码
<script type="text/javascript">
function chkValidators() {
alert("enter function chkValidators");
validatorEnable(document.getElementById('<%rfvFirstname%>'), false);
}
这给了我一个编译错误:
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1002: ; expected
Source Error:
Line 158: #line default
Line 159: #line hidden
Line 160: @__w.Write("\'), false);\r\n }\r\n </script>\r\n");
Line 161: }
Line 162:
有人知道怎么修这个东西吗?
缺口