Two Web controls on the same page, with their own validation

N

NWx

Hi,

I have an ASPX page which contains two custom web controls, and each one
have its own save button, which needs to perform validation.
My problem is, when I try to press save button for a form, even if all child
controls on the web control are validated OK, the page perform validation
for the other web control too, and validation fails, so page cannot be
submitted

How can I handle this?

Thank you.
 
J

Joe Gass

Hi NWx
The validators that come with .net don't allow you to 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 which version of visual studio you are using so I can send the
correct dll.
Cheers
Joe Gass
MCSD.net
 
P

Peter Blum

Hi NWx,

Like Joe said, this is not a feature of Microsoft's validators. It is a
future feature of ASP.NET 2.0 though. In the meantime, I have also solved
this problem. My product has been available for a while. Its "Professional
Validation And More" (http://www.peterblum.com/vam/home.aspx). It overcomes
the limitations of ASP.NET validators (there are a lot of them!) and
introduces plenty of new capabilities.

I've put together a list of 19 limitations to ASP.NET controls. You can read
the list at http://www.peterblum.com/vam/valmain.aspx.

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