Create watermarked Textbox and CalendarExtendar toolkit by using Ajax

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

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">

<html xmlns="">
<head runat="server">
        /*Textbox Watermark*/
            height: 18px;
            width: 148px;
            height: 20px;
            width: 150px;
            padding: 2px 0 0 2px;
            border: 1px solid #BEBEBE;
            background-color: #F0F8FF;
            color: gray;
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="TextBox1" WatermarkCssClass="watermarked"  WatermarkText="Click here for selecting date">
       <div style="float:left; width:20%">Enter Your DOB : </div> <div style="float:right; width:80%"><asp:TextBox ID="TextBox1" Width="100%" CssClass="unwatermarked" runat="server"></asp:TextBox>
        <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
            <asp:Button ID="Button1" runat="server" Text="Add" onclick="Button1_Click1"
                Width="74px" />
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>


Popular posts from this blog

How to show enlarge image when mouse hover on image or link in Asp.Net(c#) using JavaScript

StateCode and StatusCode Values for mostly used entities in Microsoft Dynamics CRM 2013

How to add custom filter lookup field based on OptionSet field selection in Dynamics CRM.

go to top image