473,385 Members | 1,409 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,385 software developers and data experts.

Master page and CSS link strange problem.

I have the following code in my master page:

<%@ 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>My Company</title>
<link href="http://www.mycompany.com/structure.css" rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/presentation.css" rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/PullDownMenu.css" rel="stylesheet"
type="text/css" media="screen, projection" />
<link href="~/emp.css" rel="stylesheet" type="text/css" />

The last <link> tag was generated as:

<link href="login.aspx_files/structure.css" rel="stylesheet"
type="text/css"><link href="login.aspx_files/presentation.css"
rel="stylesheet" type="text/css"><link
href="login.aspx_files/PullDownMenu.css" rel="stylesheet" type="text/css"
media="screen, projection"><link href="login.aspx_files/emp.htm"
rel="stylesheet" type="text/css">

The top three css link works. However, the last css link href has been
generated with "htm" as extension and caused the problem...
Jun 20 '06 #1
3 1650
Any clue?

"nick" wrote:
I have the following code in my master page:

<%@ 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>My Company</title>
<link href="http://www.mycompany.com/structure.css" rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/presentation.css" rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/PullDownMenu.css" rel="stylesheet"
type="text/css" media="screen, projection" />
<link href="~/emp.css" rel="stylesheet" type="text/css" />

The last <link> tag was generated as:

<link href="login.aspx_files/structure.css" rel="stylesheet"
type="text/css"><link href="login.aspx_files/presentation.css"
rel="stylesheet" type="text/css"><link
href="login.aspx_files/PullDownMenu.css" rel="stylesheet" type="text/css"
media="screen, projection"><link href="login.aspx_files/emp.htm"
rel="stylesheet" type="text/css">

The top three css link works. However, the last css link href has been
generated with "htm" as extension and caused the problem...

Jun 20 '06 #2
Have you tried re-arranging the order you intend to write them into the head
to see if the others are renamed? Are you using the new Head class in 2.0?

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"nick" <ni**@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.com...
Any clue?

"nick" wrote:
I have the following code in my master page:

<%@ 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>My Company</title>
<link href="http://www.mycompany.com/structure.css" rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/presentation.css"
rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/PullDownMenu.css"
rel="stylesheet"
type="text/css" media="screen, projection" />
<link href="~/emp.css" rel="stylesheet" type="text/css" />

The last <link> tag was generated as:

<link href="login.aspx_files/structure.css" rel="stylesheet"
type="text/css"><link href="login.aspx_files/presentation.css"
rel="stylesheet" type="text/css"><link
href="login.aspx_files/PullDownMenu.css" rel="stylesheet" type="text/css"
media="screen, projection"><link href="login.aspx_files/emp.htm"
rel="stylesheet" type="text/css">

The top three css link works. However, the last css link href has been
generated with "htm" as extension and caused the problem...

Jun 21 '06 #3
I've tried rearranging the order. Now the name is correct - with extension
css. But the css file is not what I wrote but the whole html page.
And it only happens in new pages I created. Some only page works fine.

"clintonG" wrote:
Have you tried re-arranging the order you intend to write them into the head
to see if the others are renamed? Are you using the new Head class in 2.0?

<%= Clinton Gallagher
NET csgallagher AT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/

"nick" <ni**@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.com...
Any clue?

"nick" wrote:
I have the following code in my master page:

<%@ 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>My Company</title>
<link href="http://www.mycompany.com/structure.css" rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/presentation.css"
rel="stylesheet"
type="text/css" />
<link href="http://www.mycompany.com/PullDownMenu.css"
rel="stylesheet"
type="text/css" media="screen, projection" />
<link href="~/emp.css" rel="stylesheet" type="text/css" />

The last <link> tag was generated as:

<link href="login.aspx_files/structure.css" rel="stylesheet"
type="text/css"><link href="login.aspx_files/presentation.css"
rel="stylesheet" type="text/css"><link
href="login.aspx_files/PullDownMenu.css" rel="stylesheet" type="text/css"
media="screen, projection"><link href="login.aspx_files/emp.htm"
rel="stylesheet" type="text/css">

The top three css link works. However, the last css link href has been
generated with "htm" as extension and caused the problem...


Jun 22 '06 #4

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

Similar topics

14
by: multiformity | last post by:
So I have been working on an opensource project for a while, and decided to really try to make it look better after focusing on the functionality most of this time. Up to now, I have simply used a...
0
by: Nick Stansbury | last post by:
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...
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,...
2
by: William Buchanan | last post by:
Hi folks Why are master pages such a pain? I have put a search text box and link button on my master page because I want it on all pages on my site. After lots of juggling with the different...
2
by: SR | last post by:
I have started a web site using ASP.NET 2.0. I would like to centralize all of my classes in a StyleSheet but I cannot figure out how to link the StyleSheet to a Content Page since there is no...
6
by: Ben Fidge | last post by:
Hi I've just created a new Master Page for my site and it uses the native Menu control. Strange behaviour is happening on page that use the master page. For some reason, the menu controls...
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"...
4
by: Mikaël PLOUHINEC | last post by:
Hello, I have created a master page with a css. How can I use css in the children pages? The css must be declared in the <head</headsection. Does I have to import all my css in my master? Is...
0
by: Daniel Magliola | last post by:
I'm having a weird behaviour when implementing localization resource files in my website. This looks like a .Net bug to me, but it's too obvious to be there, so I must be overlooking something. ...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.