views:

40

answers:

2

hi all i want to know that if apply server side validation on text box then when validation event fire (i means in wich state of page cycle this validation has been done in server side)

+3  A: 

It fires after the Load phase, before a button-click happens.

But in such a button-click handler, you need to check the results using Page.IsValid, to prevent handling the click when there is invalid input.

Hans Kesting
+2  A: 

From this page:

Postback event handling: If the request is a postback, control event handlers are called. After that, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page.

Steven