Two different Validations in Web Form

G

Guest

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

Peter Blum

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: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 
G

Guest

Thank you to sebastian and Peter for Peter for helping with their answers.

cheers!
pradeep_tp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top