fguihen Posted May 25, 2004 Posted May 25, 2004 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 Quote
tate Posted May 25, 2004 Posted May 25, 2004 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). Quote
wessamzeidan Posted May 25, 2004 Posted May 25, 2004 why don't you use a session variable... Quote Proudly a Palestinian Microsoft ASP.NET MVP My Blog: wessamzeidan.net
inzo21 Posted May 26, 2004 Posted May 26, 2004 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 Quote he who forgets will be destined to remember... (E.Vedder)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.