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

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

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

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. Eric
    Replies:
    0
    Views:
    703
  2. hazz
    Replies:
    6
    Views:
    51,819
    SkyUCHC
    Jun 9, 2010
  3. Noozer
    Replies:
    1
    Views:
    7,467
    Carolyn Marenger
    Mar 13, 2006
  4. Replies:
    7
    Views:
    4,836
    Pushpadant
    Jul 3, 2006
  5. ad
    Replies:
    3
    Views:
    9,064
    akkus
    Nov 3, 2006
  6. Jeff
    Replies:
    1
    Views:
    411
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Oct 2, 2006
  7. Dave L
    Replies:
    3
    Views:
    3,833
    Göran Andersson
    Mar 4, 2010
  8. chirs

    can I put CSS code in a file?

    chirs, Oct 24, 2003, in forum: Javascript
    Replies:
    1
    Views:
    131
    Lasse Reichstein Nielsen
    Oct 24, 2003
Loading...