0

I'm after some help applying for the correct syntax applying CSS layout to Asp controls/content.

For a normal .aspx page I usually link to the CSS templates in the header similar to the following.....

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
    Inherits="Project.Default" %>

<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html;charset=UTF-8" />

<head>
  <meta charset="utf-8">
  <link rel="stylesheet" href="wp-content/themes/newtheme/css/reset.css" 
    type="text/css" media="screen">
       <%--....etc--%>
  <script>
       <%--....etc--%>
  </script>
</head>
       <%--....etc--%>
<body id="page1">
       <%--....etc--%>     
</body>

</html>

How do I apply a similar CSS template to controls where the basic page structure is in the following format?

<%@ Page Title="Login" Language="C#" 
      MasterPageFile="~/themes/default/default.master" 
      AutoEventWireup="true" Inherits="login" 
      EnableViewState="false" Codebehind="login.aspx.cs" %>
<%@ Register Src="controls/login-with-captcha.ascx" 
      TagName="LoginWithCaptcha" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
       <meta name="robots" content="NOINDEX, NOFOLLOW"/>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" 
       runat="Server">
  <uc1:LoginWithCaptcha ID="LoginWithCaptcha1" runat="server" />
</asp:Content>

1 Answer 1

2

Add it in Content1 OR Content2, but i sugest in Content1 actualy its the master head!

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

       <meta name="robots" content="NOINDEX, NOFOLLOW"/>

       <link type...................YOUR CLASS............>

</asp:Content>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.