Solved

Visual Basic.net Hide Div based on login name

Posted on 2009-05-11
3
561 Views
Last Modified: 2012-05-06
I am trying to figure out how to only show a div if a certain user is logged in.  I am using VB.net and Visual Studio 2005

ie.  <div id="Michael"> </div>

If LoggedIn = Michael then div.show

etc
0
Comment
Question by:Albee_J
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
mohan_sekar earned 500 total points
Comment Utility
Add runat="server" to your div tag and set visible = "false" by default.
Then,
If 'LoggedIn' then
 <divname>.visible = true
End If
0
 

Author Comment

by:Albee_J
Comment Utility
What is the correct syntax for this line

If 'LoggedIn' then

I can't get it to work
0
 

Author Comment

by:Albee_J
Comment Utility
nevermind blonde moment figured it out

    If User.Identity.Name = "michael" Then
            Michael.Visible = True
        End If
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now