CHANGE TEXTBOX BACKGROUND COLOR ON FOCUS

<%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”Default.aspx.cs” Inherits=”_Default” %>

<!DOCTYPE html>
<html xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<title></title>
<style>
input[type=text], textarea
{
border: 1px solid #ccc;
}
input[type=text]:focus, textarea:focus
{
background-color: #FFBFFF;
border: 1px solid #ccc;
}
</style>
</head>
<body>
<form id=”form1″ runat=”server”>
ASP.Net<br />
<br />
<asp:TextBox ID=”TextBox2″ runat=”server”></asp:TextBox><br />
<br />
<asp:TextBox ID=”TextBox1″ runat=”server” TextMode=”MultiLine”></asp:TextBox><br />
<br />
<br />
</form>
</body>
</html>

 

This article has been taken from here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s