By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,660 Members | 1,735 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,660 IT Pros & Developers. It's quick & easy.

Simple Back button

P: n/a
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

Dec 20 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
By the way, I can not use a JavaScript based solution.

"Amir Tohidi" wrote:
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
Dec 20 '07 #2

P: n/a
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.

"Amir Tohidi" <Am********@discussions.microsoft.comwrote in message
news:4D**********************************@microsof t.com...
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

Dec 20 '07 #3

P: n/a
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...

"Aidy" wrote:
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.

"Amir Tohidi" <Am********@discussions.microsoft.comwrote in message
news:4D**********************************@microsof t.com...
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



Dec 20 '07 #4

P: n/a
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.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
"Amir Tohidi" <Am********@discussions.microsoft.comwrote in message
news:4D**********************************@microsof t.com...
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

Dec 20 '07 #5

P: n/a
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.
Dec 20 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.