Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

Simple Back button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amir Tohidi - 20 Dec 2007 14:04 GMT
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
Amir Tohidi - 20 Dec 2007 14:11 GMT
By the way, I can not use a JavaScript based solution.

> Hi
>
[quoted text clipped - 14 lines]
> Thanks
> Amir
Aidy - 20 Dec 2007 15:15 GMT
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.

> Hi
>
[quoted text clipped - 16 lines]
> Thanks
> Amir
Amir Tohidi - 20 Dec 2007 16:56 GMT
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...

> What's wrong with the back button on the user's browser?
>
[quoted text clipped - 32 lines]
> > Thanks
> > Amir
Aidy - 20 Dec 2007 17:40 GMT
> 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.
Cowboy (Gregory A. Beamer) - 20 Dec 2007 17:36 GMT
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.

Signature

Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************

| Think outside the box!

*************************************************
> Hi
>
[quoted text clipped - 16 lines]
> Thanks
> Amir

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.