tags:

views:

17

answers:

2

Hi,

I've a datagrid on an asp.net page "A" which shows different customer orders. On clicking on one any row/OrderId,user is redirected to another page "B" which displays order details. When user clicks "Back to Page A" on page B,I need to have the same order Id "anchored" on page A. How do i achieve this functionality in asp.net?

Thanks for reading.

A: 

In most browsers, the back button remembers where your were in the page. So a simple javascript:history.go(-1) should do just fine, and anyone who doesn't have javascript enabled can just click the back button.

Joel Coehoorn
+1  A: 

Joel's answer is correct, however, if you have a more complicated scenario you could do the following.

Modify the display on Page A to render an <a name="myRecord" /> for each row of the grid.

On page B, you can redirect back to page A and pass #myRecord at the end of the url, to navigate to the specific entry.

Mitchel Sellers
thanks for ur inputs Mitc...works like a charm!
Steve Chapman