CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 ASP displaying Session Variable in Header

Print topic Send  topic

Author Message
newbie please help
Posted: 03/14/2002, 4:21 PM

ASP no Templates trying to display the logged in users name session variable at the top of each page in the header. Also need to show buttons based on the security level in the header. Any help would be appreciated.

Sam M
Posted: 03/14/2002, 5:03 PM

First the headers:
Create a form
have the form look up the username in the users field from the db. In your form properties, place an input with the primary key for the users field and set the properties of that input to session. Call that session UserID
Easy.

Next part requires getting your hands dirty a bit.
Go into your code and find the buttons you want to hilight.
Before the button add something like this
<%if session("userrights") = "1" then%> BUTTON GOES HERE <%end if%>
Or
Say you have a button you want everyone over level two to see
That would look like this
<%if session("userrights") >2 then%>BUTTON GOES HERE<%end if%>
You can do this forever.
Don't forget to end your if statements in ASP
Forgetting to do that will generate an error.
header
Posted: 03/14/2002, 7:36 PM

Sam thanks for the info. I have another question though. How do you display the userid in the header. for example: hello {userid} how do you get it to display the variable value. I created a page that is nothing but a header under header section I added a banner and want to display the logged in users name but I can't get it to display it? Once again any help would be appreciatted.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.