Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Validator controls

Status
Not open for further replies.

Erics44

Programmer
Oct 7, 2004
133
GB
Hi
I have a set of validation controls on my web form and i now want to click a button and save the information in my validated controls into my database. I have a save buttoin but dont know what the syntax is.

If page.Validate = true then
save the stuff into my data base
else
dont save it
end if

page.validate does not return a value so I cant use that.
Thanks in advance
 
>>If page.Validate = true then

use page.IsValid

page.Validate will simply ask the controls to validate the fields...

Known is handfull, Unknown is worldfull
 
Thanks

It seams that no matter what control I click on the page will validate first

is there anyway to stop this?
 
There is a causesvalidation parameter that can be set on controls. Set it to false.

Sean. [peace]
 
Thanks for your help, I have just 1 more question

I have a number of validators that I want to put in a summary validator but I dont want me other validators to be visible. If I make my other validators invisible they dont validate. How do I do this do you know?
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top