Where to put my css file in my content page.

T

tshad

In my content page, I have to add my css file.

I would normally put it in the Head section, but I don't have one in my
content section and don't want to put it in the master page.

<link href="App_Themes/GridView/AutoUPS.css" rel="stylesheet"
type="text/css" />

Where would I put it?

<%@ Page Title="" Language="C#" MasterPageFile="~/Auto.Master"
AutoEventWireup="true" CodeBehind="Auto.aspx.cs"
Inherits="WebApplication1.Auto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
runat="server">
</asp:Content>

Thanks,

Tom
 
S

Segundo Serrano

Hi,
try this:

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link href="App_Themes/GridView/AutoUPS.css" rel="stylesheet" type="text/css" />
</asp:Content>

Regards,

S.
 
T

tshad

I did do that, but it do get a green squiggly that says Element Link cannot be nested inside eleement div.

There are Divs around the ContentPlaceHolder area in the master page.

But it does work though.

Thanks,

Tom
"Segundo Serrano" <sserrano[at]jabs[dot]com[dot]pe> wrote in message Hi,
try this:

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<link href="App_Themes/GridView/AutoUPS.css" rel="stylesheet" type="text/css" />
</asp:Content>

Regards,

S.
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top