Getting validator error message to appear without using page.validate

  • Thread starter Thread starter darrel
  • Start date Start date
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
 
this is what validation group names are for. put the button and the text
validator in the same group.

-- bruce (sqlwork.com)
 
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
 
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
 
Back
Top