By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

asp.net master pages problem

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.