Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3791988
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T12:33:12+00:00 2026-05-19T12:33:12+00:00

I was trying to incorporate a functionality in my ASP.NET such that a DIV

  • 0

I was trying to incorporate a functionality in my ASP.NET such that a DIV tag which contains the Profile Navigation Menu should only be visible if a person is logged in.
I know the condition on how to if the person is logged in or not but wanted to know the method to toggle the div tag on/off based on person’s logged in status.

if(loggedin==yes)
{
//?
}

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T12:33:13+00:00Added an answer on May 19, 2026 at 12:33 pm

    You can set the div to runat="server", and then access it as a variable in your code-behind page and set Visible to false.

    That is, you’d have something like:

    <div id="myDiv" runat="server">
    

    And then in your CS file:

    if (!loggedIn)
    {
        myDiv.Visible = false;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am just learning ASP.NET c# and trying to incorporate best practices into my
Using C#, asp.net 3.5, SqlServer 2005, Trying to incorporate some inversion of control together
I'm trying to incorporate Ninject with my ASP.NET MVC 3 RC application. From the
I am trying to incorporate a splice such that it tests for 2 things:
I'm trying to incorporate some Gravatar functionality using its XML-RPC API in an iPhone
I am trying to incorporate one of Ryan Niemeyer's jsFiddles http://jsfiddle.net/rniemeyer/WpnTU/ into my own
I am trying to create a login form on my ASP.NET website. Currently, there's
I'm trying to incorprate TinyMCE into my ASP.NET MVC project, and tiny_mce folder I
I'm trying to incorporate this yui drop down menu control in a web page:
I'm trying to incorporate Lucene.net in my web search. Currently I have a lucene.net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.