Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 637723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:39:18+00:00 2026-05-13T20:39:18+00:00

I know that calling Page.IsValid in code-behind of an ASP.NET page throws an exception

  • 0

I know that calling Page.IsValid in code-behind of an ASP.NET page throws an exception if I didn’t explicitly call Page.Validate before or if validation didn’t happen automatically in an event handler of a control with enabled “CausesValidation”.

Sometimes I am in a method or an event of a page where I need to know if all input was valid but I don’t know at this particular place where the postback came from. So I don’t know if the page was validated before or not, that means, if I can ask Page.IsValid without calling Page.Validate before or not.

Is there a way to check if a page was already validated (something like a boolean property “Page.HasBeenValidated” or whatever)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:39:18+00:00Added an answer on May 13, 2026 at 8:39 pm

    Try to assign a private variable inside a try catch

     private bool isPageValid;
     public bool IsPageValid
     {
        get
        {
          try
          {
            isPageValid= Page.IsValid
          }
          catch
          {  
            Page.Validate();
            isPageValid = Page.IsValid
          }
          return isPageValid;
        }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that |DataDirectory| will resolve to App_Data in an ASP.NET application but is
I know that ASP.NET controls such as the button have the postback event model.
I have a .aspx page calling a .asmx page's web service. In that .net
I know that I can print the current page by calling javascript:windows.print() Is it
I know that calling a virtual method from a base class constructor can be
I know that .NET is JIT compiled to the architecture you are running on
I'm writing an extension for VS2010 that reorders a page of code by rearranging
The following is on my asp.net page written in c#. Where someURL is asp.net
I know that I can do something like $int = (int)99; //(int) has a
I know that default cron's behavior is to send normal and error output to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.