global variables

fguihen

Junior Contributor
Joined
Nov 10, 2003
Messages
248
Location
Eire
when a user logs into my site, i want to use the department they choose, to allow them access to a folder on the server. im told i need a global variable to do this. how do i create and use a global variable ( Im using c sharp).
thanks all
 
I'm not familiar with C# but in VB I would do the following;

As part of the login page you can pass the department number to the next form using either Request.Form or Request.QueryString methods. In the next form grab the value passed and assign it to a variable declared right after the <script> tag (before subroutines).
 
I agree with wess... use a session variable if you can and maintain the state across the entire site for the duration of the users visit. Either way, if you're on active directory or LDAP 2, you can possibly even query the login of the user for their group id and use that for access.

inzo
 
Back
Top