Results 1 to 5 of 5

Thread: Simulating a GoBack button action from code

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    13

    Simulating a GoBack button action from code

    I am trying to simulate a goback from code. When you go back to the old page the context remain the same just as you would hit the back button. Is there any way to do this?

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Could you restate your question with more details? I'm not sure what you mean...

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    13
    I am trying to simulate a Goback from code. When you click on the Back button on the internet explorer it goes back to the previous page and the context stays the same. I want to do this from code in ASP.net projects. Is there any way to do it?

  4. #4
    Member
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    62
    Make an array or something and when the user enters a page you add the old page in the array.
    If the user continues to go to other pages just add the other in the array too.

    You should have an array on like 10 items in it (Don´t want the history to be to long?) and when you program it try to have a FIFO (First in first out) algorithm

    Example.
    User enters page
    for i=0 to 9
    check if array[i] is empty
    if empty
    Save adress to array[i]
    else
    move array[i] -> array[i+1]

    user enter another page
    same thing as above

    When the user wants to go back just read the first possition in the array and move the array backwards and remove the first adress.

    That´s my suggestion.
    //Martin Andersson

  5. #5
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    i'm not sure what the application here is, but it seems that there would be a better method than spanning something across several pages.. seems like you're trying to split a form up into steps... instead, why don't you try using the Panel control ?

    This will allow you to put each step inside a panel, and then you could have buttons like a wizard (Next and Back)...then when they click the buttons you hide all the panels that you don't want to show, and ensure the one you want to show is visible...

    This is kind of the new way to span forms over several steps... It makes more sense than to do it over actual pages.... good luck...

Posting Permissions

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



Click Here to Expand Forum to Full Width