473,698 Members | 2,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple validation problem

hi
I have the following problem: I have two button, tow textboxes and two
RequiredFieldVa lidator controls, like that:

<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ControlToValida te="TextBox1"
id="RequiredFie ldValidator1" runat="server"
ErrorMessage="* "></asp:RequiredFie ldValidator>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
<br><br>
<asp:TextBox id="Textbox2" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ControlToValida te="TextBox2"
id="Requiredfie ldvalidator2" runat="server"
ErrorMessage="* "></asp:RequiredFie ldValidator>
<asp:Button id="Button2" runat="server" Text="Button"></asp:Button>
</form>

Can I make the RequiredFieldVa lidator1 to response only to Button1 and
RequiredFieldVa lidator2 response only to Button2 ?

Thanx.
Nov 18 '05 #1
2 3392
Hi Shahar
The validators that come with .net don't do this
I've developed a set of validator controls that allow you to group them into
logical forms.

e.g.
<extendedvalida tors:RequiredFi eldValidator id="RequiredFie ldValidator2"
runat="server" ErrorMessage="t ype something" ControlToValida te="TextBox1"
group="1"></extendedvalidat ors:RequiredFie ldValidator>

In the future I'd like to sell them (after a bit more testing)...
If you like to try them mail me at jo**********@ho tmail.com and I'll send
you the dll, let me know if you are using visual studio version 2002 or 2003
Cheers
Joe Gass
MCSD.net

"Shahar" <sh****@log-on.com> wrote in message
news:e8******** *************** ***@posting.goo gle.com...
hi
I have the following problem: I have two button, tow textboxes and two
RequiredFieldVa lidator controls, like that:

<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ControlToValida te="TextBox1"
id="RequiredFie ldValidator1" runat="server"
ErrorMessage="* "></asp:RequiredFie ldValidator>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
<br><br>
<asp:TextBox id="Textbox2" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ControlToValida te="TextBox2"
id="Requiredfie ldvalidator2" runat="server"
ErrorMessage="* "></asp:RequiredFie ldValidator>
<asp:Button id="Button2" runat="server" Text="Button"></asp:Button>
</form>

Can I make the RequiredFieldVa lidator1 to response only to Button1 and
RequiredFieldVa lidator2 response only to Button2 ?

Thanx.

Nov 18 '05 #2
You are describing a concept called "validation groups" that will be in
ASP.NET 2.0. That product is a long way out. I have a solution that provides
validation groups now and offers much more to help you with validation that
ASP.NET 2.0 and all other validation products do not cover. Take a look at
my product, "Profession al Validation And More"
(http://www.peterblum.com/vam/home.aspx).

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlu m.com
Creator of "Profession al Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Shahar" <sh****@log-on.com> wrote in message
news:e8******** *************** ***@posting.goo gle.com...
hi
I have the following problem: I have two button, tow textboxes and two
RequiredFieldVa lidator controls, like that:

<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ControlToValida te="TextBox1"
id="RequiredFie ldValidator1" runat="server"
ErrorMessage="* "></asp:RequiredFie ldValidator>
<asp:Button id="Button1" runat="server" Text="Button"></asp:Button>
<br><br>
<asp:TextBox id="Textbox2" runat="server"> </asp:TextBox>
<asp:RequiredFi eldValidator ControlToValida te="TextBox2"
id="Requiredfie ldvalidator2" runat="server"
ErrorMessage="* "></asp:RequiredFie ldValidator>
<asp:Button id="Button2" runat="server" Text="Button"></asp:Button>
</form>

Can I make the RequiredFieldVa lidator1 to response only to Button1 and
RequiredFieldVa lidator2 response only to Button2 ?

Thanx.

Nov 18 '05 #3

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

Similar topics

0
1937
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in datagrids using the ItemCreated event, template colums and the Button.Attributes.Add ("onclick", "return confirm('Are you sure you wish to delete this row?');"). This works fine in some instances when you click on the delete button but not always.
0
2322
by: Richard Payne | last post by:
I am developing a web application that utilises multiple grids, panels, validation controls etc on the same page. I have added the appropriate code to pop up dialogs to confirm delete in datagrids using the ItemCreated event, template colums and the Button.Attributes.Add ("onclick", "return confirm('Are you sure you wish to delete this row?');"). This works fine in some instances when you click on the delete button but not always.
8
579
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
1
3912
by: Ken Varn | last post by:
If a page has multiple ValidationSummary controls, how does it distinguish which ValidationControls are associated with which ValidationSummary controls? The reason I am asking this is that I want to display a Message Box for the validation message on my Validation controls. My validation control is embedded within a custom server control. If my custom server control adds a ValidationSummary control, I am afraid that it may conflict...
0
1144
by: koen | last post by:
Hi! In asp.net (version 1.1) I run into a problem when trying to perform client validation. The error I get on the client-side is : "Error: expected ';'". This problem occurs when I place a specific UserControl (that doesn't have validation) on a wepage together with other UserControls that do have validation.
6
4961
by: Peter M. | last post by:
Hi all, If an event has multiple subscribers, is it possible to cancel the invocation of event handlers from an event handler? Or to be more specific: I'm subscribing to the ColumnChanging event of a datatable, from two seperate classes. I wish to do some data validating. Due to the nature of the data validation being done, I seperated this code in two classes.
5
4948
by: paul_zaoldyeck | last post by:
does anyone know how to validate an xml file against multiple defined schema? can you show me some examples? i'm making here an xml reader.. thank you
7
15652
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is there an equivalent property for the DataGridView? I have searched, but have not found one. I would like the user to be able to see all the columns of the table on one screen - thus eliminating the need to use the horizontal scroll bar to view...
0
8610
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9170
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8873
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7740
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.