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

Go Back to Search Results Page

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

Jul 29 '07 #1
Share this Question
Share on Google+
4 Replies


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

On Jul 28, 10:02 pm, bendlam <bend...@gmail.comwrote:
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

Jul 29 '07 #2

P: n/a
On Jul 29, 8:02 am, bendlam <bend...@gmail.comwrote:
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

Jul 29 '07 #3

P: n/a
On Jul 29, 12:29 am, Masudur <munn...@gmail.comwrote:
On Jul 29, 8:02 am, bendlam <bend...@gmail.comwrote:


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.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...

Jul 29 '07 #4

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

*** Sent via Developersdex http://www.developersdex.com ***
Jul 31 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.