Kasuni Abegunawardana

Kasuni Abegunawardana

  • 1.7k
  • 182
  • 45.8k

My navigation bar links are not working

Nov 16 2017 12:39 AM
Hi all, I made an asp.net project and I made a site master and I gave the redirect links for them but it doesn't redirect for pages. It gives me an error like this.
 
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Pages/~/index.aspx
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34209
 
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top" id="mainNav">
<a class="navbar-brand" href="~/index.aspx">Food Calorie Calculator</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav navbar-sidenav" id="exampleAccordion">
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Dashboard">
<a class="nav-link" href="index.aspx">
<i class="fa fa-fw fa-dashboard"></i>
<span class="nav-link-text">Dashboard</span>
</a>
</li>
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Charts">
<a class="nav-link" href="Pages/Food-Calorie-Calculator.aspx">
<i class="fa fa-fw fa-calculator"></i>
<span class="nav-link-text"> Food Calorie Calculator</span>
</a>
</li>
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Tables">
<a class="nav-link" href="Pages/Food-Diary.aspx">
<i class="fa fa-fw fa-table"></i>
<span class="nav-link-text"> Online Food Diary</span>
</a>
</li>
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Components">
<a class="nav-link nav-link-collapse collapsed" data-toggle="collapse" href="#collapseComponents" data-parent="#exampleAccordion">
<i class="fa fa-fw fa-wrench"></i>
<span class="nav-link-text"> Charts</span>
</a>
<ul class="sidenav-second-level collapse" id="collapseComponents">
<li>
<a href="navbar.html">Navbar</a>
</li>
<li>
<a href="cards.html">Cards</a>
</li>
</ul>
</li>
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Link">
<a class="nav-link" href="Pages/Burn-calorie.aspx">
<i class="fa fa-fw fa-link"></i>
<span class="nav-link-text">Burn Calorie Calculator</span>
</a>
</li>
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Link">
<a class="nav-link" href="Pages/Testimonials.aspx">
<i class="fa fa-fw fa-link"></i>
<span class="nav-link-text">Testimonials</span>
</a>
</li>
<li class="nav-item" data-toggle="tooltip" data-placement="right" title="Link">
<a class="nav-link" href="Pages/Meet-Consultant.aspx">
<i class="fa fa-fw fa-link"></i>
<span class="nav-link-text">Consultants</span>
</a>
</li>
</ul>
<ul class="navbar-nav sidenav-toggler">
<li class="nav-item">
<a class="nav-link text-center" id="sidenavToggler">
<i class="fa fa-fw fa-angle-left"></i>
</a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle mr-lg-2" id="messagesDropdown" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="fa fa-user"></i>
<span class="d-lg-none">
<span class="badge badge-pill badge-warning"></span>
</span>
<span class="indicator text-warning d-none d-lg-block">
<i class="fa fa-fw fa-circle"></i>
</span>
&nbsp;&nbsp;<asp:Label ID="lbl_userNameDisplay" runat="server" Text="Label"></asp:Label>
</a>
</li>
<li class="nav-item">
<div class="form-inline my-2 my-lg-0 mr-lg-2">
<div class="input-group">
<asp:TextBox ID="txt_serch" CssClass="form-control" runat="server"></asp:TextBox>
<span class="input-group-btn">
<asp:LinkButton runat="server" ID="btn_Search" class="btn btn-primary">
<i class="fa fa-search" aria-hidden="true"></i>
</asp:LinkButton>
<i class="fa fa-search"></i>
</span>
</div>
</div>
</li>
<li class="nav-item">
<a class="nav-link" data-toggle="modal" data-target="#exampleModal">
<i class="fa fa-fw fa-sign-out"></i>Logout</a>
</li>
</ul>
</div>
</nav>

Answers (4)