Simple Back button

A

Amir Tohidi

Hi

I have a search page which display a grid of master records. Those records
that have children have a hyperlink that takes the user to the Details page
for that record.

How can I implement a Back button on the Details page that will take the
user back to the original search page with all filter/search criteria and the
grid filled in?

I currently use

LinkButtonBack.PostBackUrl = Request.UrlReferrer.AbsolutePath

But when I click the link, I get an empty Search page.

Thanks
Amir
 
A

Aidy

What's wrong with the back button on the user's browser?

You'll need to pass the relevant parameters on the url they click to view
the detail page. eg;

detail.aspx?ID=123&colour=green&minprice=100

or whatever fields you use. Grab that info and add it to the "Back" link;

search.aspx?colour=green&minprice=100

Then your search.aspx page will use the values from the querystring if they
are present and use them to pre-populate the form and search for results.

Someone else may have something more elegant.
 
A

Amir Tohidi

Hi

Nothing wrong with the Back button - the users want their own Back button.

I can't use the solution you suggest for security reasons. There is the
Session of course...
 
C

Cowboy \(Gregory A. Beamer\)

One pattern to try is setting up the form and details in two panels on the
same page. This is a very simple MVC like pattern. Hide the panel not in use
at the time (or not - as showing the search still works). You can refine
this with things like the AJAX collapsing panel (accordian panel? forget the
name) and have the form hide and show based on use action. As all is on one
page, you can keep state for the controls.

To do this on more than one page, you will have to build the engine that
stores the state.
 
A

Aidy

I can't use the solution you suggest for security reasons.

You could encrypt the info.
There is the Session of course...

Yep, but you'll run into issues with things like that. Let's say I do a
search, look at the detail but don't hit "Back" and wonder off elsewhere. I
now return to the search back and my last search is still in the session so
the search is pre-populated and the results are not what the user is
expecting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top