Visual Basic.net Hide Div based on login name

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
Albee_JAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mohan_sekarConnect With a Mentor Commented:
Add runat="server" to your div tag and set visible = "false" by default.
Then,
If 'LoggedIn' then
 <divname>.visible = true
End If
0
 
Albee_JAuthor Commented:
What is the correct syntax for this line

If 'LoggedIn' then

I can't get it to work
0
 
Albee_JAuthor Commented:
nevermind blonde moment figured it out

    If User.Identity.Name = "michael" Then
            Michael.Visible = True
        End If
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.