J
Jonathan Wood
I'm finally getting the hang of ASP.NET.
But one thing I still struggle with is when I want to open a page and pass
that page some information. Here are some choices I have:
1. Pass it as a query string. This works for some tasks. But for other
tasks, this is neither private nor safe from being modified by casual users.
2. Use PreviousPage. This also works for some tasks. But when the data to be
passed is not really part of the page, then this model seems to break down.
3. Set a Session variable. This is both private and secure and works well.
However, it's a little awkward to "clean up" and using this technique
regularly would result in a bunch of memory being wasted for each session
unless you had a clean way to delete those variables after they were used.
I'm just curious if others have found a better approach. I'm starting to
think about using ViewState in the previous page and then using PreviousPage
to access that ViewState. Assuming that's possible, that approach is both
private and secure as well as "self-cleaning". I'd need to think about it
some more to decide how much I like that.
Thanks.
But one thing I still struggle with is when I want to open a page and pass
that page some information. Here are some choices I have:
1. Pass it as a query string. This works for some tasks. But for other
tasks, this is neither private nor safe from being modified by casual users.
2. Use PreviousPage. This also works for some tasks. But when the data to be
passed is not really part of the page, then this model seems to break down.
3. Set a Session variable. This is both private and secure and works well.
However, it's a little awkward to "clean up" and using this technique
regularly would result in a bunch of memory being wasted for each session
unless you had a clean way to delete those variables after they were used.
I'm just curious if others have found a better approach. I'm starting to
think about using ViewState in the previous page and then using PreviousPage
to access that ViewState. Assuming that's possible, that approach is both
private and secure as well as "self-cleaning". I'd need to think about it
some more to decide how much I like that.
Thanks.