Go Back to Search Results Page

B

bendlam

I have a page that contains search criteria and when you click on the
search button it causes a post back that populates a dataview on the
same page. One of the gridview columns contains a link that navigates
to a details page. When I try to go back to the search results page i
get "Page cannot be displayed" error. How do i go back to the search
results and have the search criteria and dataview unchanged?

i.e. The behaviour I'm looking for is as follows:
1. Search.aspx postback populates DataView.
2. Click on Details column takes you to Details.aspx
3. Hit back on browser or using a javascript link to go back would
return to the Search.aspx page with the user's search criteria and the
current DataView position.

Any help is much appreciated.

Thanks
 
B

Bill Nicholson

You can post to another page. Instead of posting back to the same
page, which is the default, you can specify the page to post to. Look
at the PostBackURL property of the control that you want your user to
click. I know the System.Web.UI.WebControls.Button has the property.
 
M

Masudur

I have a page that contains search criteria and when you click on the
search button it causes a post back that populates a dataview on the
same page. One of the gridview columns contains a link that navigates
to a details page. When I try to go back to the search results page i
get "Page cannot be displayed" error. How do i go back to the search
results and have the search criteria and dataview unchanged?

i.e. The behaviour I'm looking for is as follows:
1. Search.aspx postback populates DataView.
2. Click on Details column takes you to Details.aspx
3. Hit back on browser or using a javascript link to go back would
return to the Search.aspx page with the user's search criteria and the
current DataView position.

Any help is much appreciated.

Thanks

Hi,

After Search when you navigate to detail page... if you hit browsers
back button you are suppose to get back to exactly in the same
position and if you click on another item it will work just fine...
because of pages viewstate... the state of the page will do just
fine... may be you are missing some thing... one more thing you can
also provide your user a option to navigate to search page from detail
page implemented all by yourself. in that case do save the search
criteria or search result in session when user search a new result
set... and when click on detail... take user to detail... in detail
page add some button or link which says "back to search page..." or
perhaps "close" after click on the button don't do any javascript
history back... just simple postback when in response.redirect to your
search page... and repopulate the research result aswell as the search
criteria of the user...

Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.
www.kaz.com.bd
http://munnacs.110mb.com
 
B

bendlam

Hi,

After Search when you navigate to detail page... if you hit browsers
back button you are suppose to get back to exactly in the same
position and if you click on another item it will work just fine...
because of pages viewstate... the state of the page will do just
fine... may be you are missing some thing... one more thing you can
also provide your user a option to navigate to search page from detail
page implemented all by yourself. in that case do save the search
criteria or search result in session when user search a new result
set... and when click on detail... take user to detail... in detail
page add some button or link which says "back to search page..." or
perhaps "close" after click on the button don't do any javascript
history back... just simple postback when in response.redirect to your
search page... and repopulate the research result aswell as the search
criteria of the user...

Thanks
Md. Masudur Rahman (Munna)
Kaz Software Ltd.www.kaz.com.bdhttp://munnacs.110mb.com- Hide quoted text -

- Show quoted text -

thanks for the response

I understand that I can implement a button to postback to the original
search results page but how do you prevent them from hitting the back
button.

My back button always gives me a "Page cannot be displayed" error.
Why? The url doesn't change after I postback to get the search
results, does that have something to do with it? Is there a IE setting
I'm missing? Ideally I'd like to just go back and like you said the
viewstate should be the same but why it doesn't work is driving me
nuts...
 
S

Steph

Does anyone have an answer to this as I am having the same problem, I
have a search results page and when user clicks more info link and goes
to details page hits back button page cannot be displayed error appears
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top