Thanks for any help
I have a web application, and the submit uses the PostBackUrl to display data if the form is valid.
I need to use different (server side) validation groups, depending on what radiobutton is selected. That is, manually call
Page.Validate('ValidationGroupA').
The validation itself is working fine, in terms of Page.IsValid correctly assigned true or false.
however, if the page is not valid, the page redirects to the page specified by PostBackUrl on the submit button, where the page is found not to be valid, and the client redirected back with:
if (!PreviousPage.IsValid){Response.Redirect("DataEntryPage.aspx");})
However, by getting to here and back again, all form data is lost, and the relevant validation controls and summaries are not displayed.
is there an equivalent of javascripts evt.preventDefault() or some other way, once it is detected validation has failed after a manual call to Page.Validate to post the form back with appropriate validation errors displayed? Thank you.