G
Gary Larimer
I an asp.net web page with a simple form and a Submit button. Form entries
are validated client side, but as a back up I would also like to validate
server side, but not sure where to do it code.
Can the Page.IsValid property be checked in the following code:
protected void Page_Load()
{
if(IsPostBack)
{
//can IsValid be checked here on PostBack
if(IsValdi) { //respond here if not valid }
}
}
Or do I have to check IsValid in the button click handler?
Looked at page life cycles at msdn, but am not certain when the IsValid
property can be processed in code.
Thanks for any comments.
are validated client side, but as a back up I would also like to validate
server side, but not sure where to do it code.
Can the Page.IsValid property be checked in the following code:
protected void Page_Load()
{
if(IsPostBack)
{
//can IsValid be checked here on PostBack
if(IsValdi) { //respond here if not valid }
}
}
Or do I have to check IsValid in the button click handler?
Looked at page life cycles at msdn, but am not certain when the IsValid
property can be processed in code.
Thanks for any comments.