Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > problem with validation control

Reply
Thread Tools

problem with validation control

 
 
Rafia
Guest
Posts: n/a
 
      06-30-2004
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


 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      06-30-2004
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/de...pplusvalid.asp

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke


"Rafia" <> wrote in message
news:...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PasswordRecovery control trips Login control's validation The Colonel ASP .Net 1 07-06-2006 09:18 PM
Using Summary Validation control with server Custom validation =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= ASP .Net 2 10-15-2004 06:15 PM
Form Validation Problem...Persisiting form fields on validation failure. bnp Javascript 4 05-12-2004 12:16 PM
Displaying a Validation Error in a Validation Summary Control Lucas Tam ASP .Net 2 02-26-2004 07:49 PM
Re: only custom validation control does server side validation? Colin Mackay ASP .Net 0 06-25-2003 07:54 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57