problem with validation control

R

Rafia

Hi all
I have put a required validation control on one of my aspx pages. I also
have a server button on the page which the user will click to submit the
data. The problem is when the user do not enter anything on the required
field, it show the error then immediately submits the form and the code in
my server control event handler starts to execute.

Any help will be appreciated
 
T

Teemu Keiski

Hi,

does this happen when accidentally clicking enter when focus is in the field
(it is textboxt?)? Note that you should also check Page.IsValid property in
code at the server-side before letting critical code to run. But, if the
problem is that you wouldn't have client script files correctly set up in
the site root, please check it too.

Here is a good article about ASp.NEt validation generally:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/aspplusvalid.asp
 

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,780
Messages
2,569,611
Members
45,277
Latest member
VytoKetoReview

Latest Threads

Top