Skip to main content
Participating Frequently
October 26, 2012
Question

Hide content based on login role in ASP

  • October 26, 2012
  • 1 reply
  • 734 views

I need some help hiding/showing content based on the user's login.  I use a simple database with roles.

I need to hide some of the content unless the user is an admin.  ARGG!!! I can't figure this out, I can find code

for PHP and ASP.NET but not for ASP.

Any help would be a life-saver at this point or at least make my weekend!

Crystal

This topic has been closed for replies.

1 reply

Participating Frequently
October 27, 2012

You don't mention what language you are using but the concept is the same regardless. You test the variable to determine if the user is an admin and then display the appropriate html if they are. Psuedocode example

<If user = 'admin' >

<p> You are an admin</p>

<else>

<p> You are NOT an admin</p>

<end if>