Click here to Skip to main content
15,897,148 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Sir, I have following code in my very small 5 page website (With Master page). Here i am able to navigate between pages in root folder.
There are 2 pages inside Admin folder. If i go to a page inside admin folder, it will open. But, when i navigate back to any other page,

in the navigation bar.. the url do not change to home page url.

and i get Page not found error.

Kindly see my code:

ASP.NET
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div style="width:100%; height:50px; background-color:Gray">
    <span style="color:Green;"><a href="FirstPage.aspx">FirstPage</a></span>
    <span style="color:Green; margin-removed30px"><a href="SecondPage.aspx">Secnod Page</a></span>
    <span style="color:Green; margin-removed30px"><a href="ThirdPage.aspx">Third Page</a></span>
    <span style="color:Green; margin-removed30px"><a href="Admin/FourthPage.aspx">Fourth Page</a></span>
    <span style="color:Green; margin-removed30px"><a href="Admin/FifthPage.aspx">Fourth Page</a></span>
    </div>
    <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
    </form>
</body>
</html>
Posted
Updated 2-Oct-15 5:21am
v2
Comments
Kiran2401 2-Oct-15 10:34am    
Hi, thanks all.. I have solved this issue by replacing with <asp:linkbutton>
Andy Lanng 2-Oct-15 11:12am    
Hi Kiran,

Please either delete the question, or add your own solution if you think someone may find it useful.

Thanks ^_^
Kiran2401 2-Oct-15 11:14am    
Thanks Andy Lanng. I m sorry for this happened.
Andy Lanng 2-Oct-15 11:16am    
No need to apologize. I just wanted to let you know.

I am always posting code I've been looking at for 30 minutes then find the mistake 2 minutes later :P
ZurdoDev 2-Oct-15 11:22am    
As Andy mentioned, please post that as a solution so that this question no longer shows as unanswered.

1 solution

Kiran2401 wrote:

Hi, thanks all.. I have solved this issue by replacing with <asp:linkbutton xmlns:asp="#unknown"></asp:linkbutton>


Answered only to remove question from unanswered list.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900