none
Website Menu Control Missing

    Question

  • I have recently downloaded Visual Studio 2015 Community edition and have been following the article "Walkthrough: Managing Web Site Users With Roles" https://msdn.microsoft.com/en-us/library/t32yf0a9.aspx. When I get to the part on linking to restricted pages I cannot find the menu control referred to when in design view on Site.Master and a menu control doesn't exist in the list of controls shown in properties BUT if I run the project the menu is there, containing the Help, About, Contact, Register Logon pages etc. as expected, so where is the source menu control? I have tried dropping another menu control on the page and that shows, as I would expect. Just in case I messed something up I started a new web site project using the ASP.NET Web Forms Visual C# template and get exactly the same problem.

    Monday, November 09, 2015 3:41 PM

Answers

  • Hi DavidCPreston,

    According to the article that you referenced, I create a sample project with this article. I also find that there has no Menu control on the Site.master page. After I check the version of this article and compare Visual Studio 2010, Visual Studio 2012 and Visual Studio 2015, I can make sure this article is instroduce the steps with Visual Studio 2010. From VS2010, the menu on Site.master has been replaced by <ul>, it not a control. And in VS2015, the <ul> is collapsed by style. So you can't see it on designer.

    If you want to link to the page you want, you just add following code behind the About page.

     <ul class="nav navbar-nav">
          <li><a runat="server" href="~/">Home</a></li>
          <li><a runat="server" href="~/About">About</a></li>
          <li><a runat="server" href="~/AdminPages/Admin">Admin</a></li>
          <li><a runat="server" href="~/MembersPages/Members">Members</a></li>
    </ul>

    Best Regards,
    Weiwei

    Wednesday, November 11, 2015 7:14 AM
    Moderator
  • Hi DavidCPreston,

    Yes, if you want to use a Menu control, you can remove the <ul> code and drop a Menu Control from Toolbox to this location to replace the <ul>.

    Best Regards,
    Weiwei

    Thursday, November 12, 2015 2:34 AM
    Moderator

All replies

  • Hi David,

    Welcome on MSDN forum.

    If you can share the screen-shot of your issue that would be easier to provide you the proper solution. Please share the screen shot of issue.


    Thanks, If my reply is helpful please mark as answer or vote as helpful.

    Monday, November 09, 2015 7:28 PM
  • I tried but it won't allow me to upload an image until my account is verified?

    That said it hardly needs a picture, I think the description is clear enough

    Dave

    Tuesday, November 10, 2015 4:07 PM
  • Hi DavidCPreston,

    According to the article that you referenced, I create a sample project with this article. I also find that there has no Menu control on the Site.master page. After I check the version of this article and compare Visual Studio 2010, Visual Studio 2012 and Visual Studio 2015, I can make sure this article is instroduce the steps with Visual Studio 2010. From VS2010, the menu on Site.master has been replaced by <ul>, it not a control. And in VS2015, the <ul> is collapsed by style. So you can't see it on designer.

    If you want to link to the page you want, you just add following code behind the About page.

     <ul class="nav navbar-nav">
          <li><a runat="server" href="~/">Home</a></li>
          <li><a runat="server" href="~/About">About</a></li>
          <li><a runat="server" href="~/AdminPages/Admin">Admin</a></li>
          <li><a runat="server" href="~/MembersPages/Members">Members</a></li>
    </ul>

    Best Regards,
    Weiwei

    Wednesday, November 11, 2015 7:14 AM
    Moderator
  • Many thanks Weiwei. I assume a menu can still be used though?
    Wednesday, November 11, 2015 4:13 PM
  • Hi DavidCPreston,

    Yes, if you want to use a Menu control, you can remove the <ul> code and drop a Menu Control from Toolbox to this location to replace the <ul>.

    Best Regards,
    Weiwei

    Thursday, November 12, 2015 2:34 AM
    Moderator