Hello all, i just want to understand why this is happening. Consider this,
I have a masterpage(ClientMaster), a nested masterpage(Homepagenested) that references the ClientMaster.
Now, i have a folder named Webforms in the root folder. Inside this folder there are many subfolders...
say Homepage folder(Inside the Webforms folder) where there is a homepage.aspx page that references the Homepagenested Nested masterpage.In this case, when running the homepage.aspx page the
Nested masterpages and the Clientmasterpages styles goes haywire, i mean all the sidemenubars the right contents etc...are all out of place.
The shocking thing to me is that, when i create an aspx page directly under Webforms folder and not in the subfolders, the styles are maintained as if nothing happened.
I like to Keep things organized that's why i create subfolders for grouping the webforms....but it's just not working out for me.
Please, any kind of help would be appreciated. I didn't think of placing any codes here since my problem is just related to paths...i guess, but if you need the codes to
understand my problem better...then i'll be happy to place them here
EDITED
This is the way i've linked my stylesheet in ClientMaster.Master page
<link rel="Stylesheet" href="../Style/ClientStyle.css"/>
in my NestedMasterpage,
<%@ Master Language="C#" MasterPageFile="~/MasterPages/ClientMaster.master" AutoEventWireup="false" CodeFile="PlanYourTravelNested.master.cs" Inherits="MasterPages_PlanYourTravelNested" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<link rel="Stylesheet" href="../Style/NestedStyle.css" />
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</asp:Content>
the .aspx page in the subfolder that references the NestedMaster page,
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPages/PlanYourTravelNested.master" CodeFile="PlanYourTravel.aspx.cs" Inherits="WebForms_Plan_Your_Travel_PlanYourTravel" Title="Plan Your Travel" %>
this is how the link tag looks in my content pages. As you can see in the HTML file the Masterpages folder(which is in the root folder)...it is going up two directories....
FYI....i used ResolveUrl("~/Style/ClientStyle.css") to link the style sheet in the master page.
<link rel="Stylesheet" href="../../MasterPages/%3C%25=ResolveUrl(%22~/Style/ClientStyle.css%22)%20%25%3E" type="text/css" />