Not to validate whole page

H

Hardy Wang

Hi all,
I have an ASPX page with several controls to be validated on clicking
some button. I also have a ASCX control in this page.
Is there a way I can control the button in ASCX control only to validate
input within ASCX control range? Right now, when I clicked button in
customer control, it will also validate input in main page. My concept is to
divide this page into chunks by using customer controls, and buttons within
each chunk are only responsible for input of that certain chunk.

Thanks for any suggestion!

--



WWW: http://hardywang.1accesshost.com
ICQ: 3359839
yours Hardy
 
J

Joe Gass

Hi Hardy
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.
<extendedvalidators:RequiredFieldValidator id="RequiredFieldValidator2"
runat="server" ErrorMessage="type something" ControlToValidate="TextBox1"
group="1"></extendedvalidators:RequiredFieldValidator>

In the future I'd like to sell them (after a bit more testing). So far a
couple of people who have posted similar questions have found that they
work.
If you like to try them mail me at (e-mail address removed) 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
 
P

Peter Blum

Hi Hardy,

The concept that you describe will become the "validation groups" feature of
ASP.NET 2.0. You will be able to assign a group name to the submit button
and the validators it fires. My product, "Professional Validation And More"
at http://www.peterblum.com/vam/home.aspx, includes validation groups in its
22 validators. Its designed to overcome the numerous limitations of the
existing validators and greatly reduce the custom coding and hacks you need
with those validators. I've put together a list of 19 limitations in the
existing validators at http://www.peterblum.com/vam/valmain.aspx that you
can use to plan your validation effort.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

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

Top