Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > the best way to have some information accessable to all pages?

Reply
Thread Tools

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

 
 
Annie
Guest
Posts: n/a
 
      09-07-2005
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?


 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?=
Guest
Posts: n/a
 
      09-07-2005
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?
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Home is not accessable. you might not have permission to to use th =?Utf-8?B?Z3JhcGViaXJkNzE1?= Wireless Networking 1 02-08-2007 07:11 PM
File and printer sharing - network path is not accessable =?Utf-8?B?TGF3cmVuY2UgQw==?= Wireless Networking 4 07-30-2005 03:45 PM
Certain controls aren't accessable at runtime in a custom control Eric Sabine ASP .Net 3 01-28-2005 05:33 PM
Friend variable scope not accessable through object Dominic ASP .Net 0 11-03-2004 07:47 PM
PC "Not Accessable!" =?Utf-8?B?U3RldmUgQmVkZm9yZA==?= Wireless Networking 2 09-13-2004 01:42 AM



Advertisments