J
J055
Hi
I get a JScript error when I remove a control with a RequiredFieldValidator
during partial page update and then hit a form button with
CausesValidation=true. The button is outside the UpdatePanel which contains
the validators although it still seems to happen if I put the button inside
another UpdatePanel.
The client call stack is:
ValidatorValidate JScript
Page_ClientValidate JScript
WebForm_DoPostBackWithOptions JScript
Sys$WebForms$PageRequestManager$_doPostBackWithOptions JScript
JScript anonymous function JScript
JScript - aspnetForm onclick function JScript
This function fails because the control field is null.
function ValidatorGetValue(id) {
var control;
control = document.getElementById(id);
if (typeof(control.value) == "string") {
return control.value;
}
return ValidatorGetValueRecursive(control);
}
What should I do to avoid this happening?
Thanks
Andrew
I get a JScript error when I remove a control with a RequiredFieldValidator
during partial page update and then hit a form button with
CausesValidation=true. The button is outside the UpdatePanel which contains
the validators although it still seems to happen if I put the button inside
another UpdatePanel.
The client call stack is:
RequiredFieldValidatorEvaluateIsValid JScriptValidatorGetValue JScript
ValidatorValidate JScript
Page_ClientValidate JScript
WebForm_DoPostBackWithOptions JScript
Sys$WebForms$PageRequestManager$_doPostBackWithOptions JScript
JScript anonymous function JScript
JScript - aspnetForm onclick function JScript
This function fails because the control field is null.
function ValidatorGetValue(id) {
var control;
control = document.getElementById(id);
if (typeof(control.value) == "string") {
return control.value;
}
return ValidatorGetValueRecursive(control);
}
What should I do to avoid this happening?
Thanks
Andrew