Simple Back button
am 20.12.2007 15:04:00 von AmirTohidi
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
RE: Simple Back button
am 20.12.2007 15:11:04 von AmirTohidi
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
>
>
>
Re: Simple Back button
am 20.12.2007 16:15:53 von Aidy
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" wrote in message
news:4DC8FB4D-8DBB-4788-8D4E-9E0B8237A165@microsoft.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
>
>
>
Re: Simple Back button
am 20.12.2007 17:56:03 von AmirTohidi
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" wrote in message
> news:4DC8FB4D-8DBB-4788-8D4E-9E0B8237A165@microsoft.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
> >
> >
> >
>
>
>
Re: Simple Back button
am 20.12.2007 18:36:46 von NoSpamMgbworld
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" wrote in message
news:4DC8FB4D-8DBB-4788-8D4E-9E0B8237A165@microsoft.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
>
>
>
Re: Simple Back button
am 20.12.2007 18:40:15 von Aidy
> 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.