Avatar of Chris Jones
Chris Jones
Flag for United States of America

asked on 

how to add stylesheet to asp

i have a stylesheet and i can not get it to take the style can someone help
ASP file
----------------
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="register.aspx.vb" Inherits="register" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<!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 id="PageHead" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Human Resourses </title>
    <link href="Default.css" rel="stylesheet" type="text/css" />
 
<style type="text/css">
@media print
{
  .CancelButton
  {
    display:none;
  }
}
 
</style>
 </head>
 
<body style="background-color: white">
<form id="FormMain" runat="server">
<table width="770px" border="0" cellspacing="0" cellpadding="0">
   <tr class="StandardPageHeader"> 
      <td width="1" bgcolor="#FFFFFF" align="left">
         <a href="http://www.tamu-commerce.edu"><img src="BlockLogo.jpg" alt="Passionate About Learning? You Belong Here." border="0" style="height: 111px"/></a>
      </td>
	  <td align="left">
          <img src="StudentsAtComputer.jpg" style="width: 555px; height: 114px" />&nbsp;</td>
   </tr>
</table>
<table width="85%">
<asp:SqlDataSource ID="CoursesSource" runat="server" 
    ConnectionString="<%$ ConnectionStrings:TCPRODConnectionString3 %>"
    SelectCommand="SELECT c.* FROM CHRTR c INNER JOIN Registrations r ON r.CourseID=c.ID WHERE r.CancelledTime IS NULL AND r.UserID=@UserID"  
>                 
    <SelectParameters>
        <asp:SessionParameter SessionField="CWID" Type="Int32" Name="UserID" />
    </SelectParameters>    
</asp:SqlDataSource>
<asp:Repeater ID="CourseTable" runat="server" OnItemCommand="RegisterCourse" DataSourceID="CoursesSource">
 
<HeaderTemplate>
<thead>
    <tr class="StandardRowHeader" valign="bottom"> 
        <td>Course</td>
        <td>Presenter</td>
        <td>Date</td>
        <td>Time</td>
        <td>Location</td>
        <td> Seats</td>
        <td>Course Description</td>
        <td></td>
    </tr>
</thead>
</HeaderTemplate>
<ItemTemplate>
<tr class="StandardRowOdd"></tr>
    <td><%#Eval("CNAME")%></td>
    <td><%#Eval("PNAME")%></td>
    <td><%#Eval("DATE") %></td>
    <td><%#Eval("TIME") %></td>
    <td><%#Eval("LOC")%></td>
    <td><%#Eval("REMSEAT")%></td>
    <td><%#Eval("CDESC") %></td>
    <td><asp:LinkButton runat="server" Text="Cancel" CommandName="Cancel" CommandArgument='<%# Eval("ID") %>' ID="RegisterButton" CssClass="CancelButton" /></td>
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr class="StandardRowEven">
    <td><%#Eval("CNAME")%></td>
    <td><%#Eval("PNAME")%></td>
    <td><%#Eval("DATE") %></td>
    <td><%#Eval("TIME") %></td>
    <td><%#Eval("LOC")  %></td>
    <td><%#Eval("REMSEAT")%></td>
    <td><%#Eval("CDESC") %></td>
    <td><asp:LinkButton runat="server" Text="Cancel" CommandName="Cancel" CommandArgument='<%# Eval("ID") %>' ID="RegisterButton" CssClass="CancelButton" /></td>
</tr>
</AlternatingItemTemplate>
</asp:Repeater>
</table>             
<table width="770px" border="0" cellspacing="0" cellpadding="0">
   <tr>
      <td colspan="2" style="height: 15px; text-align: center;">
         <asp:PlaceHolder ID="PageBody" runat="server" />
          <br />
          <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:TCPRODConnectionString3 %>"
              SelectCommand="SELECT [CNAME] FROM [CHRTR]"></asp:SqlDataSource>
          &nbsp;
          <asp:Label ID="show" runat="server" Width="193px" ForeColor="Red"></asp:Label>
          &nbsp; &nbsp;&nbsp;
          <br />
          <asp:Label ID="CW1" runat="server" Text="UIN #" Width="59px"></asp:Label>
          <asp:TextBox ID="CWIDI" runat="server" Enabled="False" BorderStyle="None"></asp:TextBox><br />
          <asp:Label ID="FN1" runat="server" Text="First name"></asp:Label>
          <asp:TextBox ID="FNAMEi" runat="server"></asp:TextBox><br />
          <asp:Label ID="LN1" runat="server" Text="Last name"></asp:Label>
          <asp:TextBox ID="LNAMEi" runat="server"></asp:TextBox><br />
          <asp:Label ID="EM1" runat="server" Text="Email" Width="59px"></asp:Label>
          <asp:TextBox ID="EMAILi" runat="server"></asp:TextBox><br />
          <asp:Label ID="PH1" runat="server" Text="Phone" Width="58px"></asp:Label>
          <asp:TextBox ID="PHONEi" runat="server" MaxLength="9"></asp:TextBox><br />
          <asp:Button ID="Button1" runat="server" Text="Go" /></td>
   </tr>
</table>
 
 
	     <asp:Label cssclass="StandardPageHeader" runat="server" ID="Footer" Width="768px" BackColor="#0000C0">.</asp:label>
 </form>
</body>
</html>
 
 
STYLESHEET 
---------------
body {
  background-color: #DDDDDD;
 }
 
td
{
	font-family: Arial, Helvetica, Sans-Serif;
	font-size: medium;
	font-style normal;
}
 
.ErrorMessage
{
	font-weight: bold;
	color: Red;	
}
 
.StandardPageHeader
{
	font-family:  Times New Roman, Serif;
    color: #0000CC; font-size: xx-large;
	background-color: #ECECFF;
}
 
.StandardRowEven 
{
	background-color: #DCDCDC ;
}
 
.StandardRowOdd
{
	background-color: #AAAAAA;
}
 
.StandardRowHeader
{
	background-color: #87CEEB;
}
.footer
{
	background-color: #CCCCFF;
}

Open in new window

ASP.NETASP

Avatar of undefined
Last Comment
Chris Jones

8/22/2022 - Mon