Master page and CSS link strange problem.

G

Guest

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...
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top