473,325 Members | 2,442 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,325 software developers and data experts.

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 1368
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 CausesValidation 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. "Professional 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****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx

"Shaker" <Sh****@discussions.microsoft.com> wrote in message
news:A9**********************************@microsof t.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
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,...
1
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"...
4
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...
4
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. ...
6
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...
1
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...
3
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...
3
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...
1
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.