Validate page programmatically

T

tshad

How do you set the Page.IsValid property manually?

I need to check if a bunch of radio buttons are set and if none are I want
to display a message that you need to select one.

I just have a ValidateButtons routine that I call when a button is pushed
and it will set a message on the page if none of the buttons are pressed and
I want to set the IsValid property of the page so that my Page.IsValid test
in my submit function will know that there was a validation error.

You can't set it like:

Page.IsValid = false

as that is a readonly property.

Thanks,

Tom
 
G

Guest

This isnt going to answer your question per se but the radio button is used
as a way to require one to be checked. So just use either a radio button
group or individual radio buttons and give them a group name and then set one
to selected in the property window. That way one is always selected. You
can also
 

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,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top