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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        /*Textbox Watermark*/
     
        .unwatermarked
        {
            height: 18px;
            width: 148px;
        }
     
        .watermarked
        {
            height: 20px;
            width: 150px;
            padding: 2px 0 0 2px;
            border: 1px solid #BEBEBE;
            background-color: #F0F8FF;
            color: gray;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
        <asp:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server" TargetControlID="TextBox1" WatermarkCssClass="watermarked"  WatermarkText="Click here for selecting date">
        </asp:TextBoxWatermarkExtender>
   
       <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"
            TargetControlID="TextBox1">
        </asp:CalendarExtender></div>
        <div>
            <asp:Button ID="Button1" runat="server" Text="Add" onclick="Button1_Click1"
                Width="74px" />
            <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
        </div></ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

Comments

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