How to apply css to text box control
Create Website:-
1) Open Visual Studio
2) File->New Website->Give Website name and path.
3) Choose C#
Paste below code in your aspx file.
[code]
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
<!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 runat="server">
<title>How to apply css to text box control</title>
<style type="text/css">
.textbox1
{
background-color : #99FFCC;
border: 1px solid #008000;
width: 230px;
font-size: 12px;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" CssClass="textbox1" runat="server"></asp:TextBox>
</form>
</body>
</html>
[/code]
Create Website:-
1) Open Visual Studio
2) File->New Website->Give Website name and path.
3) Choose C#
Paste below code in your aspx file.
[code]
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
<!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 runat="server">
<title>How to apply css to text box control</title>
<style type="text/css">
.textbox1
{
background-color : #99FFCC;
border: 1px solid #008000;
width: 230px;
font-size: 12px;
color: red;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" CssClass="textbox1" runat="server"></asp:TextBox>
</form>
</body>
</html>
[/code]