473,322 Members | 1,232 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Validate page programmatically

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
Nov 30 '05 #1
1 1433
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

"tshad" wrote:
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

Nov 30 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steffen Balslev | last post by:
I tried to find a way to validate user credentials using C#, searching google and lots of other news and kb sites left me without a solution. You can use a SSPI but it's that easy to implement so...
1
by: Ollie | last post by:
Does anyone know how to validate a UNC path? I am currently using: Directory.Exists (szUncPath) This works if the path is located on my machine. However, if the path is for another machine...
4
by: Mr. x | last post by:
Hello, I know about the validator on : http://validator.w3.org , which can validate html pages. I just new to this validator. How can I validate (if it can be - by this validator) aspx pages,...
2
by: John Lau | last post by:
Hi, Is there documentation that talks about the page lifecycle, the lifecycle of controls on the page, and the rendering of inline code, in a single document? Thanks, John
5
by: Jim Heavey | last post by:
When should you use the Page.Validate() method? I thought you would use this method if you have some Server side validation (CustomControl's) you wanted to use and this would cause them to be...
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
3
by: Martin | last post by:
Hi, I am implemeting a form in asp.net. The form is quite large and the validation is reasonably complex, so I have decieded to implement my own validation rather than use any custon...
4
by: Brybot | last post by:
I have a form that i've split up into multiple asp:panels, each panel has a number of validators which work correctly. At on the last panel, i want to commit the data collected to a database. I...
0
by: Michael Stemper | last post by:
In article <004f629c$0$10265$c3e8da3@news.astraweb.com>, "mark4asp" <mark4asp@gmail.comwrites: <http://validator.w3.org/will validate HTML for you. No need to reinvent the wheel. -- Michael...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.