In this article I will explain how to use Ajax Calendar extender control in asp.net and how to change date format in ajax calendar control and display calendar control when click on image button in asp.net.
Description:
Previously I explained many articles relating to Ajax. Now I will explain how to use ajax calendar extender control in asp.net and change date format and display calendar control when click on image button in asp.net. Before proceed to implement this have you install ajaxcontroltoolkit in visual studio or not if not install it otherwise if you already done then follow the below steps to use Ajax calendar extender control example in asp.net.
First create one new website and add AjaxControlToolkit reference to your application after that write following line in your aspx page
<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit"
TagPrefix="ajax"
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Ajax Calendar extendar control exmaple in asp.net</title>
</head>
<body>
<form id="form1"
runat="server">
<ajax:ToolkitScriptManager ID="toolkit1"
runat="server"></ajax:ToolkitScriptManager>
<table>
<tr>
<td><b>Select Date:</b></td>
<td>
<asp:TextBox ID="txtDate"
runat="server"
/>
<ajax:CalendarExtender ID="CalendarExtender1"
TargetControlID="txtDate"
Format="dd/MM/yyyy"
runat="server">
</ajax:CalendarExtender>
</td>
</tr>
<tr>
<td><b>Select Date</b></td>
<td>
<asp:TextBox ID="txtDate1"
runat="server"/>
<asp:ImageButton ID="imgbtnCalendar"
runat="server"
ImageUrl="~/Calendar.png"
/>
<ajax:CalendarExtender ID="CalendarExtender2"
TargetControlID="txtDate1"
PopupButtonID="imgbtnCalendar"
runat="server"
/>
</td>
</tr>
</table>
</form>
</body>
</html>
|
|
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|

Subscribe by RSS
Subscribe by Email
18 comments :
Send code to create captcha at login..
Hi dear...
i am trying to use pasword strength control ajax tools in Default.aspx but it gives error i am using master page for layout. what i do for that... how to use ajax cantrol with master page?
plz help me
my mail id:-
csp567@gmail.com
yar suresh tu meko engineer bna ki hi chhodega.. nice writtern bro.. ur demos is fab
yar suresh tu meko engineer bna ki hi chhodega.. nice writtern bro.. ur demos is fab
thanks you so much..
Thanks Suresh
how to show MM/YYyY for mate.
hello sir i am getting this error please help me
Error 2 The type 'System.Web.UI.ExtenderControl' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. C:\Documents and Settings\admin\My Documents\Visual Studio 2005\WebSites\WebSite8\Default.aspx 15
Respected suresh,
i have done the process completely which u have mentioned above. Inspite of getting no errors and even getting text box and button displayed ,the calendar is not popping up on button click.
actually i am using visual studio 2005 and it obviously has framework 2.0
downloaded and installed ajax extension also.
please see the source code once
body
form id="form1" runat="server"
div
asp:ScriptManager ID="ScriptManager1" runat="server"
/asp:ScriptManager
asp:CalendarExtender ID="CalendarExtender1" TargetControlID="TextBox1" runat="server" Enabled="true"
/asp:CalendarExtender
asp:TextBox ID="TextBox1" runat="server"/asp:TextBox
/div
/form
/body
and resolve my error
For DD/MM/YYYY Format :
hi sir i m kanchan frm mumbai it student doing website project i hav linking problems in my project help me
Hi Suresh,
is there any possibilities to switch the language of CalendarExtender control, like month & days are in English which I want to convert to Turkish or Spanish on base of choice taken by user...?
Thanks & Regards,
sir can you plz tell me ,,how to insert selected date from calenderextender when calender control selected date is clicked into textbox and then to the sql server2005
thank you sir...
can anyone tell me how to add random vedio chat function in my website by using ASP.NET C#.
If anyone has such type of project plz send it to me mail :- ominglechat@gmail.com .
Plz plz plz guys its urgent....
Sir suresh i am getting this error:-
Could not load type 'System.Web.UI.ScriptReferenceBase' from assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
could u tell me the solution???please
NICE TUOTORIAL CAN U UPDAE ITS CODE BEHIND IN c# FOR INSERT IN DATABASE
Hello Sir,
Nice Article. Why Ajax Not working in visual studio 2012. i added the respective dll also. then too its not working. can you please help me out for fixing this problem?
YOUR POST ALWAYS HELPING ME....THANK SURESH BRO....