Solved

go back to the previous page with the same stage

Posted on 2006-06-30
6
249 Views
Last Modified: 2008-02-01
I was using java script to go back to the previous page. <a href="javascript:history.back()">Go Back to Previous Page</a>

But,if there is a postback ( update record) on the current page, it won't work..

I need to go back to the specific page ( queue.aspx)  with the same stage.
Ont he queue.aspx page , you can query a gridview and go to the detailpage.

On the detail page, I have can go back to the previous page by using above Java script.however,  If there are postbacks ( like update record) on the detail page, the java script won;t work, because it will take you to the previous stage, not the queue.aspx page with the same query result in gridview.


It seems like i need to session variables... Any idea?

0
Comment
Question by:jung1975
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 18

Accepted Solution

by:
Elvio Lujan earned 250 total points
ID: 17021091
you can go bak adding a postback in the link...

when page_load save in one session variable the previous page and in the back link press reditect to it
0
 

Author Comment

by:jung1975
ID: 17021141
can you show me some code examples?
0
 
LVL 5

Assisted Solution

by:vinodhsomasekharan
vinodhsomasekharan earned 250 total points
ID: 17023667
Hai,

Yes u can go for session variables which seems to be a better idea..
what u can try the following method in page_load event of  your pages..

If Not IsPostBack Then
           session("prevPageUrl") = Request.UrlReferrer.ToString
End If

and in the click event of u r GoBack button u can use this session value to navigate to the actual previous page..

Response.Redirect(session("prevPageUrl").ToString)

U can go for window.history()  function but its a tedious process to keep track of the postbacks and the actual call for this page..


Hope this helps u

Regards
Vinodh
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question