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

  • Home
  • SEARCH
  • 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 6112479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:45:00+00:00 2026-05-23T14:45:00+00:00

I’ve encountered a weird problem. Everytime I refresh the page, IsPostBack is false. To

  • 0

I’ve encountered a weird problem. Everytime I refresh the page, IsPostBack is false.
To make sure nothing in my contents or master pages is causing this, I have created an empty web form and fired it up in debug mode. still, on postbacks, I have IsPostBack set to false.

I have enableSessionState="true" and <sessionState timeout="30" /> in web.config.

It’s driving me nuts!

Update: I refresh the page by hitting F5. Based on answers this should not cause a postback. I’d like to know when a use refreshes the page (even manually) and prevent some modifications to db).
Is there a solution for this?

  • 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-23T14:45:00+00:00Added an answer on May 23, 2026 at 2:45 pm

    Refreshing the page (pressing F5 or the refresh button in your browser) is not a postback. A postback occurs when a button is clicked, a dropdown is changed, or some other event on the page that causes data to be sent to the server (via HTTP POST, hence the name ‘postback’)

    Your question doesn’t make it clear whether you are refreshing the page manually or posting back to the server via a button click or some other event.

    Since you are manually refreshing the page, IsPostBack will always be false.

    There are two types of requests (in a sense) in ASP.NET:

    • a regular request (e.g. the user is loading the page for the first time)
    • a postback (e.g. a button was clicked on the page, sending data to the server)

    If you want to track if a user has been to a page before in either case, you’ll need to track that your self. You can set a variable in the Session to do this:

    Session["UserHasVisitedThisPageBefore"] = true;
    

    Then you can check it in place of your current IsPostBack check:

    if(Session["UserHasVisitedThisPageBefore"] != null && (bool)Session["UserHasVisitedThisPageBefore"])
    {
        // stuff here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
i got an object with contents of html markup in it, for example: string
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm making a simple page using Google Maps API 3. My first. One marker

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.