Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 12th, 2008, 9:18 PM   #1
Robocop
Programmer
 
Join Date: Sep 2004
Posts: 42
Rep Power: 0 Robocop is on a distinguished road
ASP.NET Custom Validation

I have two textboxes, which I want to validate, but the thing is that one of them must be filled, but not both. How can I add this validation to the validation summary? I looked at the methods but none seem to do this. I have added RequiredFieldValidator for other textboxes and their messages are showing up, but I need advise with this.

Thanks
Robocop is offline   Reply With Quote
Old Feb 13th, 2008, 12:47 AM   #2
mbd
Programmer
 
Join Date: Nov 2007
Posts: 86
Rep Power: 1 mbd is on a distinguished road
Re: ASP.NET Custom Validation

http://msdn2.microsoft.com/en-us/lib...or(VS.71).aspx
mbd is offline   Reply With Quote
Old Feb 13th, 2008, 9:54 AM   #3
itgalary
Newbie
 
itgalary's Avatar
 
Join Date: Feb 2008
Posts: 11
Rep Power: 0 itgalary is on a distinguished road
Re: ASP.NET Custom Validation

I think an easy logic is to concatenate the text of both and then check if its not empty

eg. Text1 is aaa and text2 nothing then catenetated will be aaa and vice versa
__________________
Free Programming help http://www.itgalary.com
Free Revenue Sharing http://blog.itgalary.com
Online Site seeing http://www.itgalary.com/maps/
itgalary is offline   Reply With Quote
Old Mar 7th, 2008, 12:31 AM   #4
dilipv
Newbie
 
Join Date: Mar 2008
Posts: 3
Rep Power: 0 dilipv is on a distinguished road
Re: ASP.NET Custom Validation

Quote:
Originally Posted by Robocop View Post
I have two textboxes, which I want to validate, but the thing is that one of them must be filled, but not both. How can I add this validation to the validation summary? I looked at the methods but none seem to do this. I have added RequiredFieldValidator for other textboxes and their messages are showing up, but I need advise with this.

Thanks

Hi Robocop,

i saw your quote and even i too suggest that by using if - else condition you can make it out.i would to know on which technology you r working with.

Thank you
Jitesh
Programmer
Sharepoint Consulting

Last edited by dilipv; Mar 7th, 2008 at 12:35 AM. Reason: editing the reply
dilipv is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Learning ASP.net Samerron ASP.NET 7 Aug 28th, 2007 3:45 AM
ASP.Net Tutorial smita ASP.NET 0 Mar 15th, 2007 7:43 AM
Domain Object Validation hoffmandirt Software Design and Algorithms 5 Apr 28th, 2006 6:39 PM
How to create office xp like menus and other custom controls some1 C++ 5 Nov 8th, 2005 2:28 PM
Need help with Form Validation script jl403 JavaScript and Client-Side Browser Scripting 13 Sep 22nd, 2005 4:46 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:21 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC