Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Go Back to Search Results Page

Reply
Thread Tools

Go Back to Search Results Page

 
 
bendlam
Guest
Posts: n/a
 
      07-29-2007
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

 
Reply With Quote
 
 
 
 
Bill Nicholson
Guest
Posts: n/a
 
      07-29-2007
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 <(E-Mail Removed)> wrote:
> 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



 
Reply With Quote
 
 
 
 
Masudur
Guest
Posts: n/a
 
      07-29-2007
On Jul 29, 8:02 am, bendlam <(E-Mail Removed)> wrote:
> 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

 
Reply With Quote
 
bendlam
Guest
Posts: n/a
 
      07-29-2007
On Jul 29, 12:29 am, Masudur <(E-Mail Removed)> wrote:
> On Jul 29, 8:02 am, bendlam <(E-Mail Removed)> wrote:
>
>
>
>
>
> > 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...

 
Reply With Quote
 
Steph
Guest
Posts: n/a
 
      07-31-2007
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 ***
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp.net 1.1 - going back to search results =?Utf-8?B?c3Fsc3Rlcg==?= ASP .Net 1 02-03-2006 02:20 AM
UPDATE : Help Required to Populate search results - Array Search Craig Keightley Javascript 10 06-29-2005 10:54 AM
search within a search within a search - looking for better way...my script times out Abby Lee ASP General 5 08-02-2004 04:01 PM
Prevent 'Page has expired' when a client hits back to return to a search page Mike ASP .Net 1 08-08-2003 03:05 PM



Advertisments