A
APA
I have registered a OnSubmit client script using the below statement:
ClientScript.RegisterOnSubmitStatement(this.GetType(), Guid.NewGuid().ToString(), "var retVal = validateForm(); return retVal;");
The validateForm() function is called properly and does all the validation that it's supposed to however when the page is posted back the submit
button's OnClick eventhandler is not fired. As soon as I take the OnSubmit script out then it works. I've seen some examples where you can replace
the __doPostBack function but I didn't think that was necessary since my OnSubmit code is being executed.
Should I use the replacement for the __doPostBack function in place of the OnSubmit code?
ClientScript.RegisterOnSubmitStatement(this.GetType(), Guid.NewGuid().ToString(), "var retVal = validateForm(); return retVal;");
The validateForm() function is called properly and does all the validation that it's supposed to however when the page is posted back the submit
button's OnClick eventhandler is not fired. As soon as I take the OnSubmit script out then it works. I've seen some examples where you can replace
the __doPostBack function but I didn't think that was necessary since my OnSubmit code is being executed.
Should I use the replacement for the __doPostBack function in place of the OnSubmit code?