Wednesday, November 11, 2009

Validation is not working in the Page !!

When validation is not working or not being fire , then where we use (Page.IsValid)? Use it at the Button for which you are using.

Use this when validation is not working on the page -

if (Page.IsValid)
{


}

On the Button_Submit.


When we have used validation on the page and validation is not working on Button click. Then use use Page.Isvalid on the Buttion Click.. Like that..

Protected void btnSubmit_Click(Object sender, EventArgs e)

{

if(Page.IsValid)
{

}

}

No comments: