locked
New menu item for new page shows the home page and not the intended page RRS feed

  • Question

  • User1841825477 posted

    I used the standard "Create a new web forms site" procedure. (VS 2015)

    There are three pages: Home, About and Contact for which the menu works correctly 
    Then I added a new page (Add>New Item> Web Form)
    The name of the new page is "Issues"
    The only place where I can see a menu construct is at Line 52 in the Site.master so I added an "Issue line" as shown below.

    <div class="navbar-collapse collapse">
                        <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="~/">Issues</a></li> 
                             <li><a runat="server" href="~/Contact">Contact</a></li>
                        </ul>

    View in browser works from the Issues page.
    But when I click on the "Issues" item on the menu bar, I am taken to the home page.

    How do I add a new page to the menu bar so that it takes me to the correct page?

    Thanks 

     

    Monday, January 29, 2018 7:26 PM

Answers

  • User1841825477 posted

    OK- I can see my error- I did not include "Issues" after the "~/"

     Problem solved!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 29, 2018 7:37 PM

All replies

  • User1841825477 posted

    OK- I can see my error- I did not include "Issues" after the "~/"

     Problem solved!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 29, 2018 7:37 PM
  • User2103319870 posted

    How do I add a new page to the menu bar so that it takes me to the correct page?

    Add PageName(Issues) to the path like below

     <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="~/Contact">Contact</a></li>
                            <li><a runat="server" href="~/Issues">Issues</a></li>
                        </ul>

    Monday, January 29, 2018 7:38 PM