Solved

Visual Basic.net Hide Div based on login name

Posted on 2009-05-11
3
566 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Accepted Solution

by:
mohan_sekar earned 500 total points
ID: 24355537
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
ID: 24356259
What is the correct syntax for this line

If 'LoggedIn' then

I can't get it to work
0
 

Author Comment

by:Albee_J
ID: 24356390
nevermind blonde moment figured it out

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

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
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…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

729 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