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

Two different Validations in Web Form

Hi all,

I have a ASP.net web form which has Two imageButtons imageButtion1 and
imageButton2. I also have two textBoxes, textBox1 and textBox2.

I want to use validation server controls to achieve the following

1) When I click imageButton1 I need to validate ONLY textBox1.
2) When I click imageButton2 I need to validate ONLY textBox2.

I need to display the javascript messagebox using validationSummary Server
Control

Currently when I am using the validation controls, the validation is run for
both the text boxes if I click imageButton1 or imageButton2.

Any idea what I am doing wrong here or how do i achive this.

cheers!
pradeep_tp
(Query_0000003)

Nov 19 '05 #1
3 1362

Yes, the lack of validation groups in ASP.NET 1.1. Maybe this will help you

http://blog.icsharp.net/2005/06/19/g...80%93-finally/
"pradeep_TP" <pr*******@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
Hi all,

I have a ASP.net web form which has Two imageButtons imageButtion1 and
imageButton2. I also have two textBoxes, textBox1 and textBox2.

I want to use validation server controls to achieve the following

1) When I click imageButton1 I need to validate ONLY textBox1.
2) When I click imageButton2 I need to validate ONLY textBox2.

I need to display the javascript messagebox using validationSummary Server
Control

Currently when I am using the validation controls, the validation is run
for
both the text boxes if I click imageButton1 or imageButton2.

Any idea what I am doing wrong here or how do i achive this.

cheers!
pradeep_tp
(Query_0000003)

Nov 19 '05 #2
There are several ways to do this in ASP.NET 1.x.

1. My Professional Validation And More
(http://www.peterblum.com/vam/home.aspx) is a replacement to the ASP.NET
validators that greatly extends its functionality. It has "validation
groups" similar to ASP.NET 2.0's but with more features. Validation groups
allows you to assign a group name to a submit control and the validators it
fires.

2. See this article for a technique using server side validation to simulate
validation groups: http://aspalliance.com/699.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"pradeep_TP" <pr*******@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
Hi all,

I have a ASP.net web form which has Two imageButtons imageButtion1 and
imageButton2. I also have two textBoxes, textBox1 and textBox2.

I want to use validation server controls to achieve the following

1) When I click imageButton1 I need to validate ONLY textBox1.
2) When I click imageButton2 I need to validate ONLY textBox2.

I need to display the javascript messagebox using validationSummary Server
Control

Currently when I am using the validation controls, the validation is run
for
both the text boxes if I click imageButton1 or imageButton2.

Any idea what I am doing wrong here or how do i achive this.

cheers!
pradeep_tp
(Query_0000003)

Nov 19 '05 #3
Thank you to sebastian and Peter for Peter for helping with their answers.

cheers!
pradeep_tp

"Peter Blum" wrote:
There are several ways to do this in ASP.NET 1.x.

1. My Professional Validation And More
(http://www.peterblum.com/vam/home.aspx) is a replacement to the ASP.NET
validators that greatly extends its functionality. It has "validation
groups" similar to ASP.NET 2.0's but with more features. Validation groups
allows you to assign a group name to a submit control and the validators it
fires.

2. See this article for a technique using server side validation to simulate
validation groups: http://aspalliance.com/699.

--- Peter Blum
www.PeterBlum.com
Email: PL****@PeterBlum.com
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
"pradeep_TP" <pr*******@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
Hi all,

I have a ASP.net web form which has Two imageButtons imageButtion1 and
imageButton2. I also have two textBoxes, textBox1 and textBox2.

I want to use validation server controls to achieve the following

1) When I click imageButton1 I need to validate ONLY textBox1.
2) When I click imageButton2 I need to validate ONLY textBox2.

I need to display the javascript messagebox using validationSummary Server
Control

Currently when I am using the validation controls, the validation is run
for
both the text boxes if I click imageButton1 or imageButton2.

Any idea what I am doing wrong here or how do i achive this.

cheers!
pradeep_tp
(Query_0000003)


Nov 19 '05 #4

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

Similar topics

19
by: Gérard Talbot | last post by:
posted to: alt.html and comp.infosystems.www.authoring.html followup-to: comp.infosystems.www.authoring.html Hello all, I have 2 questions about validations. 1- What's basically the...
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...
2
by: anil kumar via .NET 247 | last post by:
(Type your message here) hi, i am using save & cancel webform button my webpage to with somevalidations , when i am trying to save my content it is savedthat time i need a popup msg like ur 'data...
1
by: Anup | last post by:
In my form I and doing validations using 'Javascript' as I m using ASP1.1 and there is very less support for Validators there. //Code Behind private void Page_Load(object sender,...
7
by: php newbie | last post by:
I am creating a form Form1.php that posts to the another form Form2.php. I have input validations on the first form. I need the user to go to the next form ONLY if the inputs from the user are...
2
by: prakashsurya | last post by:
Hello I am going through the validations in a form I would like to know the validations to be considered in writing javascript for email id so would u plz help me in writing the necessary...
10
by: polydegmon | last post by:
I'm having a problem with client side validations. When i use the code below it breaks at line 14 "var vSearch = document.getElementById("txtSearch").value;" When i use a simple form with a form...
3
by: Olivia Towery | last post by:
I cannot figure out how to complete two script validations onsubmit. Only the first one listed runs. If anyone knows how to do this, please help. -- Olivia Towery
2
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
3
by: saga git | last post by:
How to update the datagrid through javascript validations IN WEB FORM
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
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...
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
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.