473,763 Members | 6,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Field validation Per Submit buttuns

For simplicity, I have on one form:
-textbox1/Requiere For validation1 / submitbuttun1,

-textbox2/Requiere For validation2 / submitbuttun2,

I have two submit buttons on an ASP.Net page with two textboxes and two
require for validation controls per textbox.

In summary I want to group the fields on the page per submit action, and not
on any action.

My concern is when button on is pressed, then validation1 is fired only,
Without validation2 and vice versa.

In summry I want to

Is that possible, or is there any workaround to obtain this.

help.

--
MCSD not .Net yet :(
Nov 19 '05 #1
1 1387
Microsoft will finally offer the feature of "validation groups" in ASP.NET
2.0. The buttons and validators have a GroupName property. You assign a
common group name to the submit button and the validators it fires. ASP.NET
2.0 will not be out until later this year.

For now, you have these choices:
1. Use server side validation on submit like this:
- Set the CausesValidatio n property to false each submit button
- In the Click event method, call Validate() on each validator that the
submit button should fire. Then check that all Validators IsValid property
is true before saving.

2. I wrote a replacement to ASP.NET validators that overcomes its numerous
limitations. "Profession al Validation And More"
(http://www.peterblum.com/vam/home.aspx) has validation groups, support for
many more browsers on the client-side, 22 validators, and much more. I wrote
it because Microsoft's solution is very simplistic, leaving people asking
for numerous improvements and writing custom code and hacks. My solution
includes a utility to quickly convert you from Microsoft's validators to
mine. It also includes several enhanced textboxes and tools to use
javascript on your web forms without you writing the cross-browser
compatible code.

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

"Shaker" <Sh****@discuss ions.microsoft. com> wrote in message
news:A9******** *************** ***********@mic rosoft.com...
For simplicity, I have on one form:
-textbox1/Requiere For validation1 / submitbuttun1,

-textbox2/Requiere For validation2 / submitbuttun2,

I have two submit buttons on an ASP.Net page with two textboxes and two
require for validation controls per textbox.

In summary I want to group the fields on the page per submit action, and
not
on any action.

My concern is when button on is pressed, then validation1 is fired only,
Without validation2 and vice versa.

In summry I want to

Is that possible, or is there any workaround to obtain this.

help.

--
MCSD not .Net yet :(

Nov 19 '05 #2

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

Similar topics

7
8695
by: Mike | last post by:
I've been trying for the past week to put a simple code together. I have done a LOT of searching, found scripts showing the functions I would like to use, however when I mix them it all goes wrong, somehow I always end up with error messages and functions not working right. Can someone please help me? I have a form, inside is 1 Text Field and 2 Password Fields. What I'm looking to do is: - Make sure password fields are equal - Set...
1
1128
by: Bilal | last post by:
Hi, I have a field that requires validation when you press a button as follows: <form name="form_affiche" enctype = "multipart/form-data" method="get"> ..... <td width="80"><input type="Button" name="submitButton" value="Modifier" tabindex="3" onClick="if(isValid()) {document.form_affiche.action='order.php';document.form_affiche.submit();}return false;"></td>
4
1845
by: Darren | last post by:
How can I require a textbox only if a checkbox is checked. If the user checks the box for "fruit" then they have to enter the type of fruit If the user does not check the "fruit" box then they do not have to enter the type of fruit. Thanks! Darren
4
2629
by: Tim Meagher | last post by:
I am trying to use both validation controls and to add submit button attributes, but when I add the button attributes, the javascript fpr the validation controls is no longer created for the page. How can I use both? Thank you, Tim Meagher
6
21322
by: Paul | last post by:
I am trying to setup a field validator and tried using the control to validate set to a dropdown list box but did not seem to work. Is there anyway to set this up or do you need to use client side validation? Thanks -- Paul G Software engineer.
1
3027
by: sck10 | last post by:
Hello, I have a button that is associated with a validation group. When I click the button and a validation fails, I still want to code to execute. Can this be done? Any help with this would be appreciate. Thanks in advance, Sck10 In my code behind: Sub Submit_Click(ByVal Sender As Object, ByVal Args As EventArgs)
3
2117
by: Srinivas | last post by:
Hi If a textbox is being validated using a required field validator then we need to key in some text before sumbmitting the form. But if we key in a space character this gets validated to true and the form gets submitted. I want to make sure that the user enters some text and submit the form, and not just enter a space character and submitting the form. Any ideas how to achieve this. Thanks,
3
2715
by: Kivak Wolf | last post by:
Hi, Could someone give me a quick review of how to use the required field Validator? I'm completely at a loss, and MSDN does not help one bit. =/ Basically all I want done is to make sure that the user enters some text into a field called "txbName" and when they click on the submit button, if they have not entered anything into the field, a Required Field Validator will say "Invalid Name". Thanks,
1
1872
by: AECL_DEV | last post by:
Hello Everyone, Ive seen alot of people saying that the best way to AJAX Validate a form is through the submit button, because validation should be synchronous. Im wondering, is there any good way to validate a form field by field like AJAX would do, but to keep it synchronous? i.e. one action, one validation. Thanks,
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
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
10002
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8822
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...
0
6643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
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...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.