Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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).

Posted

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

he who forgets will be destined to remember... (E.Vedder)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...