I have a page with an updatepanel that contains record selection criteria (i.e. ZIP Code) and a datalist containing the results. The list has bound hyperlinks that open the individual items ("showitem.aspx?itemid=..."). The problem I have is when the user
views an item and they browser back, the query criteria and results gone and they have to reenter it. How do I preserve the page so they don't have to re-enter it?
Thanks, Ken, but that's 2.0ville. I'm using 4.0 in VS2010. It appears I should use EnableHistory on the SM, but we have the SM on a master page and this action is going on in content pages. How do I make that work?
A simpler solution is when user browse the detail of an item , you just pop up a new window(or a layer), so the current window will keep its status.
A more complex solution is when the user browse the detail of an item , you should save current "status" (I means all the values of the controls) to somewhere(like session), when the user close and return , you can recover the "status" from saved data.
Marked as answer by VISAR on Feb 21, 2012 12:22 AM
VISAR
Member
241 Points
81 Posts
Preserve Page Contents?
Feb 20, 2012 10:41 PM|LINK
I have a page with an updatepanel that contains record selection criteria (i.e. ZIP Code) and a datalist containing the results. The list has bound hyperlinks that open the individual items ("showitem.aspx?itemid=..."). The problem I have is when the user views an item and they browser back, the query criteria and results gone and they have to reenter it. How do I preserve the page so they don't have to re-enter it?
Ken Tucker
All-Star
16797 Points
2608 Posts
MVP
Re: Preserve Page Contents?
Feb 20, 2012 11:03 PM|LINK
http://www.asp.net/web-forms/videos/aspnet-ajax/how-do-i-use-the-aspnet-ajax-history-control
Space Coast .Net User Group
VISAR
Member
241 Points
81 Posts
Re: Preserve Page Contents?
Feb 20, 2012 11:29 PM|LINK
Thanks, Ken, but that's 2.0ville. I'm using 4.0 in VS2010. It appears I should use EnableHistory on the SM, but we have the SM on a master page and this action is going on in content pages. How do I make that work?
VISAR
Member
241 Points
81 Posts
Re: Preserve Page Contents?
Feb 20, 2012 11:42 PM|LINK
By the way, the criteria are speciified through a number of textboxes, dropdowns and checkboxes.
MarvinYan
Member
56 Points
8 Posts
Re: Preserve Page Contents?
Feb 21, 2012 12:17 AM|LINK
A simpler solution is when user browse the detail of an item , you just pop up a new window(or a layer), so the current window will keep its status.
A more complex solution is when the user browse the detail of an item , you should save current "status" (I means all the values of the controls) to somewhere(like session), when the user close and return , you can recover the "status" from saved data.
VISAR
Member
241 Points
81 Posts
Re: Preserve Page Contents?
Feb 21, 2012 12:23 AM|LINK
Thanks, Marvin. I'll go with the open a new window approach for now.