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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

validation controls on a screen with multiple buttons

Status
Not open for further replies.

monkeymeister

Programmer
Mar 17, 2005
58
0
0
GB
I am working on a site that has a number of image buttons as links, and I need to add a page to the project that uses validation controls. Is it possible to do this, since whenever I press any of the image buttons the validation is triggered? Will I have to get rid of the image button links?


Cheers,

Mike
 
Set the CausesValidation property of your ImageButtons to false. You can then selectively fire your validation controls in the sub/method of your choice.
Code:
private void SomeMethod()
{
myValidationControl.Validate();
if (!myValidationControl.IsValid)
    return;
else
    // do something else
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top