Clear TextBox Value When User Clicks Inside TextBox
If TextBox Assign Email Id Default Text Assigned Enter Valid EmailId When Click Inside TextBox
Clear the Validation Text Using in Asp.Net C#.
DEMO
If TextBox Assign Email Id Default Text Assigned Enter Valid EmailId When Click Inside TextBox
Clear the Validation Text Using in Asp.Net C#.
DEMO
HTML CODING
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
Name
<asp:TextBox ID="txtName" runat="server"
onclick="if (this.value
== 'Enter Name') {this.value='' ;this.style.color = 'black'}" onblur="if(this.value.length==0) { this.value='Enter
Name';this.style.color = 'grey'}"
Width="275px" ForeColor="#999999">Enter Name</asp:TextBox>
Email Id<asp:TextBox ID="txtEmailId" runat="server" onclick="if (this.value
== 'Enter Email') {this.value='';this.style.color = 'black'}" onblur="if(this.value.length==0)
{ this.value='Enter Email'; this.style.color = 'grey'}"
Width="275px" ForeColor="#999999" >Enter Email</asp:TextBox>
</form>
</body>
</html>
0 comments:
Post a Comment