How to create AJAX WatermarkExtender in ASP.NET?

In this article I have explained in detail about AJAX water mark concept in ASP.NET. For example if we cannot enter any text in the text box we can show some default text in the text box like enter user name etc. For that kind of situation we can use AJAX water mark concept in the ASP.NET. Read and learn how to create AJAX WatermarkExtender in ASP.NET?

Learn how to create AJAX WatermarkExtender in ASP.NET?

Client side:

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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
<title>AJAX Water Mark Example</title>
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server">
<asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" WatermarkText="Enter your name here !"
<table width="600" cellpadding="0" cellspacing="0" align="center">
<td height="100" align="center">
<asp:RequiredFieldValidator ID="reqname" runat="server" ErrorMessage="Enter Name"
ControlToValidate="txtName"></asp:RequiredFieldValidator><br />
<br />
<br />
Enter Your Name :
<asp:TextBox ID="txtName" runat="server"></asp:TextBox><br />
<td align="center" height="50">
<asp:Button ID="btnSubmit" runat="server" Text="Submit" />


Source Code Detail:
Here with I have attached source code of AJAX watermark example download and try to learn this concept.

Front End : ASP.NET

I hope this article help to know Ajax watermarkextender.


  • Source Code (43582-191752-AJAXWMark.rar)
  • Comments

    Guest Author: B Kumar23 Feb 2013

    Good Job!!!

    Full Marks!!!

  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name: