<script type="text/javascript">
function ValidateProductID(sender, args)
{
var productID = document.getElementById('<%=txtProductID.ClientID%>').value;
var productType = document.getElementById('<%=rcbProduct.ClientID%>').value;
if (productID != "" && productType == "") {
args.IsValid = false;
}
else
args.IsValid = true;
}
自定义验证器的此脚本正在引发异常。
An exception of type 'System.Web.HttpException' occurred in System.Web.dll but was not handled in user code Additional information: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>)
.
有人可以告诉我如何解决它。