How to implement CSS properties in TextBox in asp.net

CS1401
Posted by CS1401 under ASP.NET category on | Points: 40 | Views : 6905
<html>
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.TextBox1
{
font-family: sans-serif;
font-size: 9px;
font-style:normal;
height:18px;
background-color:Green;
}
.TextBox2
{
font-family: Verdana;
font-size: 9px;
font-style:normal;
height:48px;
background-color:Olive;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>

<asp:TextBox ID="TextBox1" runat="server" CssClass="TextBox1"></asp:TextBox>

<asp:TextBox ID="TextBox2" runat="server" CssClass="TextBox2"></asp:TextBox>

</div>
</form>
</body>
</html>

Comments or Responses

Login to post response