Re: Session variables problem
From: Simon Matthews (SimonMatthews_at_discussions.microsoft.com)
Date: 12/01/04
- Next message: Hans Kesting: "Re: Transparent PNG"
- Previous message: Peter Blum: "Re: required field validator"
- In reply to: bruce barker: "Re: Session variables problem"
- Next in thread: Joe Fallon: "Re: Session variables problem"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 1 Dec 2004 10:17:03 -0800
Bruce,
Thanks, we came up with this about 30mins ago and will most likely go this
route. If I key it into the session I suppose I would need to get rid of them
over time otherwise you could build up a lot of redundant data on long
sessions ?
I'm not sure I understand the viewstate properly, it only seems to get set
on a postback, so on the second page the first time it loads the vieewstate
would not save the details until the user did something ? but if they simply
looked at the results and then came back to the page later the viewstate
would be null ?
Simon.
"bruce barker" wrote:
> you can store the query data in session in a keyed collection. just store
> the key in the url or viewstate
>
> -- bruce (sqlwork.com)
>
>
> "Simon Matthews" <SimonMatthews@discussions.microsoft.com> wrote in message
> news:A935A4AB-6BF9-436A-9C24-C68BF625F179@microsoft.com...
> | I am having issues with the right way to architecture the following (using
> c#
> | asp.net):-
> |
> | The question I have is how best pass the collected data from one web page
> | for use in another.
> |
> | The question I have is how best pass the search criteria from the first
> page
> | to the second. The search criteria exists as a structure and is filled
> when
> | the user presses the 'Search' button on the first page.
> |
> | 1. Present an asp page for collecting user search criteria
> | 2. Show grid with results of search after querying SQL
> |
> |
> |
> | If I use the session to store it, then this causes problems as the session
> | variable is overwritten on a second search by the user, but a couple of
> | presses on the back button of the browser will get you to a page expecting
> | different criteria in the session from earlier which is no longer there.
> |
> | ViewState seems no good as it only works on postback and the above issue
> | would still cause a problem.
> |
> | I do not want to pass the search criteria in the address line as this is
> | messy and allows the user to change and view it.
> |
> | I beleive you can also use Server.Transfer but I think this would have a
> | similiar issue with the data being available long-term.
> |
> | Any pointers as to the correct approach to this would be most welcome.
>
>
>
- Next message: Hans Kesting: "Re: Transparent PNG"
- Previous message: Peter Blum: "Re: required field validator"
- In reply to: bruce barker: "Re: Session variables problem"
- Next in thread: Joe Fallon: "Re: Session variables problem"
- Messages sorted by: [ date ] [ thread ]