473,397 Members | 1,949 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Problem in using "RequiredFieldValidator"

Hi Group,

In my project I m using "RequiredFieldValidator" for the validations of
text box,

There are two TextBox, say "txtBox1" and "txtBox2" now I want to make
either of TextBox mandatory, means atlest one should contain some text
and both should not be empty at a time.(I am using ASP.NET1.1 and C#
with Visual Studio 2003)

Can somebody suggest me any event on "RequiredFieldValidator" that can
do this or any other way to implement this.
Best Regards

Anup

Mar 1 '06 #1
1 2683
> Hi Group,

In my project I m using "RequiredFieldValidator" for the validations of
text box,

There are two TextBox, say "txtBox1" and "txtBox2" now I want to make
either of TextBox mandatory, means atlest one should contain some text
and both should not be empty at a time.(I am using ASP.NET1.1 and C#
with Visual Studio 2003)

Can somebody suggest me any event on "RequiredFieldValidator" that can
do this or any other way to implement this.
Best Regards

Anup


You can't use a RequiredFieldValidator, as it can handle just one field
at a time. You need a CustomValidator here, with a server-side handler
and possibly a client-side one as well. With this you can check
anything you want.

Hans Kesting
Mar 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Nelson Roda | last post by:
When im validate "textbox" with a "RequiredFieldValidator the textbox have .text="Mike<ss", the simbol "<" makes a page erro with "A potentially dangerous Request.Form value was detected from the...
3
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function...
2
by: RSB | last post by:
Hi all, i have this form with the NewText Fields and then the Editable datagrid for all the existing Records. So i have to Buttons "Add New" and "Save Changes" and there is a Set of Validations...
1
by: Nathan Sokalski | last post by:
When testing a form of mine which uses RequiredFieldValidators that have the Display property set to "Dynamic" the ErrorMessage property is automatically removed when an entry is completely typed...
3
by: Bart Van Hemelen | last post by:
Here's what I'm trying to accomplish: I get a number from another page that indicates the number of members. The page I want to build -- actually it's not a page, but a UserControl -- needs to...
2
by: Dabbler | last post by:
In my Registrant FormView I have a DropDownList which loads data from a secondary SqlDataSource "sdsOfficeParks". I need the user to select an office park but save the selected value in the...
4
by: Chicagoboy27 | last post by:
All I am trying to find a solution for removing the ?returnUrl if a user is not authenticated. I want to be redirect an unauthenticated user to the login.aspx less the returnUrl. Once they log...
1
by: Brock | last post by:
What does the "I" at the start of some terms signify? Examples: INamingContainer, IComparable Also what are some of the most common examples and their use?
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.