Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Validation occurs when trying to clear a form!?

Reply
Thread Tools

Validation occurs when trying to clear a form!?

 
 
Infidel
Guest
Posts: n/a
 
      11-20-2004
Hi there,

Can anyone tell me how I can stop this from happening.

Basically, I'm using validation controls on a form which works great... but,
perhaps a little TOO great. When I click Clear... which is supposed to run
a function which empties all the fields and resets lists, etc... the
validation still kicks in and shows error messages, and the form doesn't
clear.

It's not until you fill in all required fields with valid info that the
Clear Form function runs.

What's going on, and how do i fix it?

Thanks for any help.


Jeremy.




 
Reply With Quote
 
 
 
 
John M Deal
Guest
Posts: n/a
 
      11-20-2004
If your clear is behind an ASP.Net button (in its code behind event)
you'll need to set the CausesValidation property on the button to false.
Is this the case or is your clear routine being run on the client side?

Have A Better One!

John M Deal, MCP
Necessity Software

Infidel wrote:
> Hi there,
>
> Can anyone tell me how I can stop this from happening.
>
> Basically, I'm using validation controls on a form which works great... but,
> perhaps a little TOO great. When I click Clear... which is supposed to run
> a function which empties all the fields and resets lists, etc... the
> validation still kicks in and shows error messages, and the form doesn't
> clear.
>
> It's not until you fill in all required fields with valid info that the
> Clear Form function runs.
>
> What's going on, and how do i fix it?
>
> Thanks for any help.
>
>
> Jeremy.
>
>
>
>

 
Reply With Quote
 
 
 
 
Ken Dopierala Jr.
Guest
Posts: n/a
 
      11-20-2004
Hi Jeremy,

Set the CausesValidation property of the Clear button to False. Good luck!
Ken.


--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.

"Infidel" <> wrote in message
news:...
> Hi there,
>
> Can anyone tell me how I can stop this from happening.
>
> Basically, I'm using validation controls on a form which works great...

but,
> perhaps a little TOO great. When I click Clear... which is supposed to

run
> a function which empties all the fields and resets lists, etc... the
> validation still kicks in and shows error messages, and the form doesn't
> clear.
>
> It's not until you fill in all required fields with valid info that the
> Clear Form function runs.
>
> What's going on, and how do i fix it?
>
> Thanks for any help.
>
>
> Jeremy.
>
>
>
>



 
Reply With Quote
 
Infidel
Guest
Posts: n/a
 
      11-20-2004
Hi Guys,


Thanks so much for your help... it worked a treat, I thought they'd be
something like that as it seemed to stupid a bug for this situation to
be allowed to occur.

I need to have a full list of Class Properties with me, as I'm using
Dreamweaver and guess which Property does not show up in the pop-up
context menu when editing controls... you guessed it!

Thanks again for your help.

Jeremy.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
Response.Clear() doesn't clear David ASP .Net 2 01-31-2008 08:32 PM
Unrecognized element 'add' after <clear></clear> InvalidLastName ASP .Net Web Services 3 03-06-2007 03:07 AM
Validators - error message not showing when JS disabled & only server side validation occurs TS ASP .Net Web Controls 2 06-20-2006 10:00 AM
where is the validation occurs for validation controls baroque Chou ASP .Net 4 01-24-2006 03:32 PM
RadioButtonList postback occurs everywhere but on server itself Timo ASP .Net 1 01-26-2004 10:56 PM



Advertisments