Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
"Add a button with CausesValidation set to false. When this button is clicked, manually
validate the page by calling the Page.Validate() method. Then examine the IsValid prop-
erty, and decide what to do."

Beginning ASP.NET 3.5 in C# 2008 – from Novice to Professional (ISBN-10 (pbk): 1-59059-891-1) P. 341

The book is for .NET 3.5 however, I'm training on Visual Studio 2010 using .NET 4.0.

I tried using the following code, however, it does not seem to run the validations within the page:
Page.Validate();
        if (!Page.IsValid) lblMessage.Text = "Errors";


So, where is my mistake?

Complete code here.
Posted

1 solution

Nobody is going to download your RAR file to look at the code.

You should post the code here so we can see it.
 
Share this answer
 
Comments
jon-80 4-Jul-10 22:00pm    
Dumb answer
Richard Andrew x64 4-Jul-10 22:30pm    
You demand "where is my mistake," and don't provide any code to look at. Dumb question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900