اجاکس سنگین می کنه صفجه ات رو الکی چیز خاصی نداره 2خط جاوا اسکریپت دیگه...
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
.WaterMarkedTextBox
{
border-right: C#cccff thin solid;
border-top: C#cccff thin solid;
border-left: C#cccff thin solid;
border-bottom: C#cccff thin solid;
color: gray;
display: inline;
background: AliceBlue;
visibility: visible;
}
.NormalTextBox
{
border-right: C#cccff thin solid;
border-top: C#cccff thin solid;
border-left: C#cccff thin solid;
border-bottom: C#cccff thin solid;
color: black;
display: inline;
background: #ffffff;
visibility: visible;
}
</style>
<script language="javascript" type="text/javascript">
function Focus(objname, waterMarkText)
{
obj = document.getElementById(objname);
if(obj.value == waterMarkText)
{
obj.value="";
obj.className = "NormalTextBox";
}
}
function Blur(objname, waterMarkText)
{
obj = document.getElementById(objname);
if(obj.value == "")
{
obj.value=waterMarkText;
obj.className = "WaterMarkedTextBox";
}
else
{
obj.className = "NormalTextBox";
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server" onfocus="Focus(this.id,'this is a test')" onblur="Blur(this.id,'this is a test')"></asp:TextBox>
</div>
</form>
</body>
</html>