By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,795 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,795 IT Pros & Developers. It's quick & easy.

the best way to have some information accessable to all pages?

P: n/a
hello all,

I need to have access to some details in all my pages eg a Person object.

what is the best way to do it?
store in session object? or pass them through the QueryString or Application
variables etc?

what is the best and efficient way?
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
It really depends on the nature of the application. Overall, I am not fond of
putting everything in hidden tags so it can travel on the Query String. It
potentially opens security holes.

Where you store information depends on the nature of the information.

If it is linked to the user, cookies are an option. For security, you can
send the user's token instead, or link it to the session ID. This will
require grabbing the information with each return, but it is safer than
storing in the cookie.

For session specific information, you can use the Session object as a cache.
You can also use the cache manager functionality of ASP.NET.

For page specific information (like the Person object is the person being
worked on, not the person using the app), you can use ViewState.

As I stated at the beginning, it really depends on the nature of the
application.

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

***************************
Think Outside the Box!
***************************
"Annie" wrote:
hello all,

I need to have access to some details in all my pages eg a Person object.

what is the best way to do it?
store in session object? or pass them through the QueryString or Application
variables etc?

what is the best and efficient way?

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.