Getting validator error message to appear without using page.validate

D

darrel

(apologies for the repost...I put this in the wrong newgroup the first
time...)

I have a text box that I have a custom validator attached to. I then have an
image button that is set to NOT cause validation (as there are other
validators on the page I don't want triggered).

The event handler for my imageButton is set up to validate the text box:

-------------
textbox.validate

if textbox.isvalid then...
-------------

This works. If it's valid, it executes, if not, it doesn't. The problem is
that if it's not, the custom validator error text doesn't appear. Why is
that?

-Darrel
 
B

bruce barker

this is what validation group names are for. put the button and the text
validator in the same group.

-- bruce (sqlwork.com)
 
D

darrel

this is what validation group names are for. put the button and the text
validator in the same group.

Where/how does one do this? I don't see a group name property. (I'm using
the 1.1 framework, btw...)

-Darrel
 
D

darrel

Where/how does one do this? I don't see a group name property. (I'm using
the 1.1 framework, btw...)

Ah. After some googling, that appears to be a asp.net 2.0 feature.

So, anyway to do this in 1.1 without just writing out my own error message
to screen? (Actually, perhaps that's the easiest solution at this point...)

-Darrel
 

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

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,196
Latest member
ScottChare

Latest Threads

Top