473,325 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

asp.net master pages problem

I'm experiencing a weird problem with master pages in VS 2005 - in short
when the master page is open in design view in visual studio all other
webforms that use that master display correctly when opened in design view.
However, if the master page is not open in design view, then webforms opened
in design view don't display correctly at all. Here are the specifics:

My master page has the following lines of html:

<head runat="server" id="HeaderTag">
<title>Untitled Page</title>
<link href="~/Content/CSS/MenuStyles.css" runat="server" rel="stylesheet"
type="text/css" />
<link href="~/Content/CSS/TemplateSettings.css" runat="server"
rel="stylesheet" type="text/css" />
<link href="~/Content/CSS/TextStyles.css" runat="server" rel="stylesheet"
type="text/css" />
<link href="~/Content/CSS/PresentationStyles.css" runat="server"
rel="stylesheet" type="text/css" />
</head>

And the following in Page_load:

BodyTag.Controls.Add(New LiteralControl("<script type=""text/javascript""
src=""" & Request.ApplicationPath & "/Content/Includes/glfunctions.js""/>"))

As specified above, if I open the master page itself in design view, and
then open another page, there are no problems, the styles are applied fine.
If however, I don't open the master page then when any page that is built on
that master is opened, none of the styles are applied and the page comes out
looking totally wrong.

Any ideas why this is happening?

Thanks, Nick
Mar 21 '06 #1
0 1048

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Michael Herman \(Parallelspace\) | last post by:
1. What are some compelling solutions for using Master/Content pages with Web Pages? 2. If a content area has a web part zone with web parts, what is the user experience like when "editting" the...
20
by: Alan Silver | last post by:
Hello, In classic ASP, I used to use two include files on each page, one before and one after the main content, to provide a consistent layout across a web site. That way I could just change the...
1
by: Alan Silver | last post by:
Hello, I am just experimenting with master pages, and am trying to add a content placeholder in the <head> section, so that individual pages can set their own page title and meta tags. The...
4
by: EagleRed | last post by:
I am writing an ASP.NET 2.0 application that uses more than one master page. Currently, there are two pages, Freedom1.master and Freedom2.master. I have no problems with Freedom1.master. However,...
8
by: otto | last post by:
Hi, all: I have a problem with the inclusion of .js files in mu .aspx pages when using Master Pages. I try to explain it. If I make a web project without master pages I simply put in the head...
2
by: news.sbcglobal.net | last post by:
I hope I can explain this well enough to understand. I have a master page that is used by almost all of the pages in my site. On the master page is a table. In one of the cells in this table, I...
7
by: xkeops | last post by:
Thinking of creating a website, most of the pages will have a general toolbar menu, a content and a footer. The content will be the only one who's gonna change but the rest (header,footer) will...
2
by: Argirop | last post by:
I have a page Default.aspx. Its first line is the following: <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs"...
3
by: Rich | last post by:
Hi, I want to use 2 master pages, one for the main part of the site, the other for the admin pages. They are quite similar, with many shared elements. Ideally I would like to have a parent...
6
by: =?Utf-8?B?SmF5IFBvbmR5?= | last post by:
I am trying to access a Public property on a Master Page from a Base Page. On the content pages I have the MasterType Directive set up as follows: <%@ MasterType virtualpath="~/Master.master" %>...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.