PC Review


Reply
Thread Tools Rate Thread

ASP.NET input validation being fired by wrong control

 
 
JP2006
Guest
Posts: n/a
 
      23rd Aug 2006
I am using asp.net input validation on a web form to check user input.
The web form is on a web user control which is then dragged on to a
..aspx page.
The .aspx page also contains other web user controls in the way of
various LinkButtons.

The problem is that although the validation fires correctly when a user
incorrectly completes the form it also fires when the user clicks on a
LinkButton on that page!

I'm sure this should be doable - otherwise you would not be able to
have mulitiple web user controls that did postbacks on the same page
which would be nonsensical!
Hopefully I am missing something obvious ;-)
Any ideas?

 
Reply With Quote
 
 
 
 
JP2006
Guest
Posts: n/a
 
      23rd Aug 2006
Figured it out - needed to add the line CausesValidation="false" to
the other controls to prevent them from firing the validation.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
RequiredFieldValidator fired when no validation needed Vik Microsoft ASP .NET 2 6th Apr 2009 03:50 PM
How to control data input useing validation Balachandran Microsoft Excel Programming 0 28th Jan 2009 12:50 PM
ASP.net validation controls don't are not validated(fired) on the client side. mallik Microsoft ASP .NET 3 7th Jul 2005 09:42 AM
Event fired on the wrong object Claude Schneegans Windows XP Internet Explorer 1 6th May 2005 11:32 PM
Control Events not fired =?Utf-8?B?cnlhbmc=?= Microsoft Dot NET Framework Forms 0 25th Feb 2005 08:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:33 AM.