I'm not sure if this is a "ASP Professional" Question, so here it goes. I was asked to redirect this post to an ASP.NET Forum cause I posted to the ASP Database before. So I'm posting here and also at ASP.NET 1.1 because I don't know where to post this one:
I need some help passing session variables from my login page to the next page. This is what I am trying to do:
- When users of the Human Resources Department access the next few pages via a login page, I want them to only see a button that is for Human Resources.
- Conversely, when users of the Information Services Department access the next few pages via a login page, I want them to only see a button that is for Information Services.
The order of the pages is as follows:
1.) Login Page
2.) Default Thank You Page (telling users that the login was successful)
3.) User Interface Page (where the user, depending on which department they are from, can only view specific buttons that pertain to their department).
I thought I was doing it correctly with the following code for the 'User Interface Page':
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="108" height="46">
<param name="BGCOLOR" value="">
<param name="movie" value="HR Button (Dept Module).swf">
<param name="quality" value="high">
<embed src="HR Button (Dept Module).swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="108" height="46" ></embed>
On the page before (the 'Default Page'), I have the following script:
<script runat="server" language="VB
On the page before that, the 'Login Page', I have the following code which authenticates the Username. In my Access Database, I have two tables that are linked which should pull the Department that the username is from. Here is the Login Page code:
if dsLogin.RecordCount > 0 then
Session("sessUsername") = Request.Form("tfUsername")
FormsAuthentication.RedirectFromLoginPage("tfUsern ame.value", true)
else if ((Request.Form("tfUsername"))) <> Nothing _
OR ((Request.Form("tfPassword"))) <> Nothing
Response.Write("Login Failed. Please Try Again.")
Any thoughts to why this is not working? Oh yeah, I'm using Dreamweaver as an application.