programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Friday, September 13, 2013

How to add calendar with textbox

Add calendar with Textbox in

In programming , Here we see the code of programming by which we can easily add a calendar with text box and you can say how to associate ajax control with programming controls ,here we go to add calendar control with textbox.

Step 1- take a text box on page .

<asp:TextBox ID="txtdate" runat="server"></asp:TextBox>
Id is this text box is ‘txtdate’

Step2-add calendar control.

<asp:CalendarExtender ID="txtdate_CalendarExtender" runat="server" Format="dd-MMM-yyyy" Enabled="True" TargetControlID="txtdate" PopupButtonID="Image1"></asp:CalendarExtender>

Step-3 take a image ;

 <asp:Image ID="Image1" runat="server" ImageUrl="~/Include/Images/Calendar_scheduleHS.png" />
For this you want to add Ajax toolkit in project and Register the contror in page of  the code for register control in page
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

Example :here we conceder a sample example

<asp:TextBox ID="txtPdate" runat="server"></asp:TextBox>
                        <asp:CalendarExtender ID="txtPostdate" runat="server" Format="dd-MMM-yyyy"
                            Enabled="True" TargetControlID="txtPdate" PopupButtonID="Image1">

                        <asp:Image ID="Image1" runat="server" ImageUrl="~/Include/Images/Calendar_scheduleHS.png" /> Controls And Examples with code :