473,611 Members | 2,242 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Go Back to Search Results Page

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
4 3517
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.W ebControls.Butt on 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
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.redire ct 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
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.redire ct 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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2575
by: NotGiven | last post by:
Say you have three pages, a search page, a results/master, and a detail page. You choose parameters on your search page and submit the page. The results show in the reults/master page. You click one to go the details page. You hit the browser button to go back and it shows the results/master page but shows "Page has expired" error. How can you prevent this? How can you show the results page whether you get
4
5744
by: Dave Smithz | last post by:
Hi there, When filling out a web form on a php page that is submitted to a search which lists the results based on the criteria provided (in the form), all works fine and as expected. However, when I press the back button to amend the form all of the search criteria data has gone and I have to fill it all out again if I want to do a similar search which is frustrating. (This does not actually happen in Firefox browser but most of my...
2
3522
by: CharitiesOnline | last post by:
Hello, I have set this script up to add paging to a search results page. Which on the first page works fine. I calculates how many pages there should be depending on the number of results returned from my search and how many records I have set it to display per page. All great so far, HOWEVER..... When you click the next link to see the next 10 results on the next page, it just dumps the search details and pulls up all the records in the...
8
1885
by: Galahad | last post by:
Here's the question: I have a form w/ TextBox controls and a Search Button control. Once the user clicks the Search Button, they get a Modal dialog w/ a datagrid that contains their search results. They select a row and click OK. The return value of the Module triggers an method that populates the TextBoxes w/ values and disables them. After the TextBoxes are disabled, I change the text of the buton to "Search Again" since I have to...
3
2402
by: Penny Bond | last post by:
Hi, Any help or suggestions on this one would be gratefully appreciated: I have 2 aspx pages one is called 'Query' and the other 'Details'. Query page has a number of text boxes and drop down's for parameter selection, a 'Search' button and a grid that displays the results (the results contain links to 'Details' page with query string params). The 'Details' Page allows user to see detailed information on the selected product.
1
1674
by: sqlster | last post by:
I have a search page which renders results upon post back based on certain input criteria. Clicking on a link on a search result such as order number navigates to the order detail screen. What is the best away to program behind the "Back to search results" screen on order detail screen. Should I session stored the input criteria on search page so that when it is invoked from order detail screen, it would pull out that information and...
2
1704
by: emorgoch | last post by:
Hi there, I'm trying to figure out how to create myself a "Back" link in a ASP.NET 2.0 application that will handle my cases. What I have is a page that has multiple pages that it can be entered from, and will have internal post-backs as well (rendering the option to use the browsers back option useless). For example, my target page may be a page containing details about a product. The page can be loaded either from a list of results...
1
1469
by: terryshamir | last post by:
Hi - I'm doing my first ASP project. In my App I present one asp page with parameters for a search (search.asp) - when they do a search the form is posted to another ASP page (displayresults.asp) which displays the results. They then select one of search results and submit to another page. IF the search didn't produce any results I would like the submit button on the displayresults.asp to sent them back to search.asp so user can...
5
1805
by: =?Utf-8?B?QW1pciBUb2hpZGk=?= | last post by:
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?
0
8149
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8097
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8561
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8240
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
4042
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4108
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2546
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1692
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.