Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    Regular Coder
    Join Date
    Nov 2004
    Location
    The land of chocolate
    Posts
    226
    Thanks
    1
    Thanked 16 Times in 16 Posts

    Refresh and postback

    Hey,

    Yeah, it's me and my newbie questions again.

    For an ASP.NET assignment, I am making a quiz with random questions. The question should only change when the user presses the button, so in order to keep the same question on the screen when the user reloads the page, I tried to put my code between an "if not IsPostBack"-check. I always assumed a simple refresh returned IsPostBack to true.

    But in contrast to what I assumed, IsPostBack returns false even if the user simply refreshes the page. I thought you had to completely renew the page for that (by closing the window or adding a space to the URL or something like that).

    Since a refresh is apparently not a postback, is there any way to get around this? I suspect cookies might do the trick, but I am not sure.
    Last edited by snowieken; 12-07-2004 at 11:26 PM.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •