Validator Control

Y

Yoshitha

Hi,

In my webform i have few text box controls and 1 button control.
and for each text box i have placed

required field validatior.
and i set the following properties of

required field validator

Control to validate = the corresponding

text box name
display=dynamic
error message=must enter value
enableclient script=true

when am running my application if i directly goes to 2 textbox control with
out entering any value in 1st textbox then it has to display the error
message

which i had specified na but it is

not displaying any error message at

that time but it is displaying error

message after clicking on submit

button.
but what i need is it has to display this message
when the control lost its focus.
or before clicking on submit button.

can anybody tell me the solution for my problem.plz its urgent.
thanx in advance
yoshitha
 
Y

Yoshitha

hi sara
i have set postback property of all the text boxes to true only.
tough i set am not getting the messages which i had provoded for these
controls .
am getting these messages after clicking submit button only but i want
todispay before clicking on submit button
 
G

Guest

to do this u must chang the property of enable validation to true but on
textbox i dont know how
 
G

Guest

set textbox autopostback property to true and add the following code to the
page_load event:

if ( Page.IsPostBack )
{
Page.Validate();
}

Hth. Kind regards,
Nikander & Margriet Bruggeman
 
Y

Yoshitha

I set post back property true for all the text boxes.and for each text box i
also placed required field validator control.

so when i run my application if i enter any data in the first text box then
am getting the messages for remaining text boxes which i had set for
required field validator control.
why am getting all those messages before entering the data in remaining
text boxes?

can u tell how to solve this problem
thanx in advance
yoshitha
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top