Where to put my css file in my content page.

Discussion in 'ASP .Net' started by tshad, Oct 27, 2009.

  1. tshad

    tshad Guest

    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
     
    tshad, Oct 27, 2009
    #1
    1. Advertising

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


    "tshad" <> escribió en el mensaje de noticias news:u$itZ%...
    > 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.
    >
    >
    >
    > Where would I put it?
    >
    > <%@ Page Title="" Language="C#" MasterPageFile="~/Auto.Master"
    > AutoEventWireup="true" CodeBehind="Auto.aspx.cs"
    > Inherits="WebApplication1.Auto" %>


    > <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
    > runat="server">
    > </asp:Content>
    >
    > Thanks,
    >
    > Tom
    >
    >
     
    Segundo Serrano, Oct 27, 2009
    #2
    1. Advertising

  3. tshad

    tshad Guest

    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 news:...
    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.
    ------------------------------------------------------------------------------


    "tshad" <> escribió en el mensaje de noticias news:u$itZ%...
    > 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.
    >
    >
    >
    > Where would I put it?
    >
    > <%@ Page Title="" Language="C#" MasterPageFile="~/Auto.Master"
    > AutoEventWireup="true" CodeBehind="Auto.aspx.cs"
    > Inherits="WebApplication1.Auto" %>


    > <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1"
    > runat="server">
    > </asp:Content>
    >
    > Thanks,
    >
    > Tom
    >
    >
     
    tshad, Oct 28, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. hazz
    Replies:
    6
    Views:
    50,024
    SkyUCHC
    Jun 9, 2010
  2. Replies:
    7
    Views:
    4,693
    Pushpadant
    Jul 3, 2006
  3. ad
    Replies:
    3
    Views:
    8,856
    akkus
    Nov 3, 2006
  4. Gabriel Rossetti
    Replies:
    3
    Views:
    594
    Jerry Hill
    Apr 25, 2008
  5. Dave L
    Replies:
    3
    Views:
    3,364
    Göran Andersson
    Mar 4, 2010
Loading...

Share This Page