I am trying to build a Web Application using Visual Studio 2005 and C# 2005. I need to accept a date in a particular textbox. I tried to use AJAX Calendar Extender for the purpose. I have added AJAX Script Manager and CalendarExtender controls to the webpage
and set the TargetControlId of CalendarExtender to the proper textbox id. But when I display the webpage (using Debug -> Start Without Debugging) and click inside the textbox nothing happens. I even tried to add an image control to the form and set the PopupButtonId
of the CalendarExtender to the image, but even then I am unable to display the calendar control. What am I doing wrong??
Do you get the calendar icon next to the text box? one of the properties of the control will point to the icon, you may need to make sure you have the icon and it's in the correct path.
Do you get any errors, or javascript errors?
Please remember to Mark As Answer if helpful
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
Based on your description, I suggest that you'd better check you
web.config. Also you can compare your web.config with the sample code's that you can download from where you have seen the video tutorial.
Eager_Beever
Member
2 Points
10 Posts
AJAX Calendar Extender Control NOT working
Sep 11, 2012 07:54 AM|LINK
I am trying to build a Web Application using Visual Studio 2005 and C# 2005. I need to accept a date in a particular textbox. I tried to use AJAX Calendar Extender for the purpose. I have added AJAX Script Manager and CalendarExtender controls to the webpage and set the TargetControlId of CalendarExtender to the proper textbox id. But when I display the webpage (using Debug -> Start Without Debugging) and click inside the textbox nothing happens. I even tried to add an image control to the form and set the PopupButtonId of the CalendarExtender to the image, but even then I am unable to display the calendar control. What am I doing wrong??
visualstudio2005
avinash_bhud...
Contributor
2881 Points
517 Posts
Re: AJAX Calendar Extender Control NOT working
Sep 11, 2012 08:23 AM|LINK
Something may have gone wrong.
Refer following articles on how to use calendar extendar it might help you.
http://weblogs.asp.net/scottgu/archive/2007/08/19/using-asp-net-ajax-control-extenders-in-vs-2008.aspx
http://www.dotnetcurry.com/ShowArticle.aspx?ID=149
http://asp-net-example.blogspot.in/2009/11/ajax-calendarextender-how-to-use.html
http://www.codeproject.com/Tips/407460/How-to-use-ASP-NET-AJAX-Calender-Extender
christiandev
Star
8597 Points
1841 Posts
Re: AJAX Calendar Extender Control NOT working
Sep 11, 2012 08:23 AM|LINK
Do you get the calendar icon next to the text box? one of the properties of the control will point to the icon, you may need to make sure you have the icon and it's in the correct path.
Do you get any errors, or javascript errors?
Regards, Christiandev (@chrisdev80), MCPD Web (2 & 4) & MCTS Windows (www.ScoreDonkey.com)
Eager_Beever
Member
2 Points
10 Posts
Re: AJAX Calendar Extender Control NOT working
Sep 11, 2012 09:03 AM|LINK
Sorry but none of the links given by you solved my problem.
The fourth link (code Project) tells to add the following to web.config.
<pages> <controls> <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/> </controls> </pages>avinash_bhud...
Contributor
2881 Points
517 Posts
Re: AJAX Calendar Extender Control NOT working
Sep 11, 2012 09:21 AM|LINK
Alternatively you can try using Jquery DatePicker
Refer the links
http://forums.asp.net/t/1697789.aspx/1
http://forums.asp.net/t/1798607.aspx/1
http://jquery-with-asp.net/2011/07/jquery-ui-datepicker-with-asp-net/
http://forums.asp.net/t/1615174.aspx/1
hari.infotec...
Member
29 Points
90 Posts
Re: AJAX Calendar Extender Control NOT working
Sep 11, 2012 09:43 AM|LINK
Try this one...
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server" Enabled="True" TargetControlID="TextBox1"> </asp:CalendarExtender> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager>visualstudio2005
chetan.sarod...
All-Star
65619 Points
11118 Posts
Re: AJAX Calendar Extender Control NOT working
Sep 12, 2012 03:34 AM|LINK
Based on your description, I suggest that you'd better check you web.config. Also you can compare your web.config with the sample code's that you can download from where you have seen the video tutorial.
http://forums.asp.net/t/1134095.aspx/2/10
visualstudio2005
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Song-Tian - ...
All-Star
43699 Points
4304 Posts
Microsoft
Re: AJAX Calendar Extender Control NOT working
Sep 12, 2012 05:51 AM|LINK
Hi,
Make sure you install the correct version of the AjaxControlToolkit:
Version 3.0.20229 2008-02-29 release of the AJAX Control Toolkit targets the official release of .NET Framework 3.5 and Visual Studio 2008.
Version 1.0.20229 You can also download the Toolkit for .NET Framework 2.0, ASP.NET AJAX 1.0 and Visual Studio 2005.
Version 3.0.40412
April 12, 2010 release of the AJAX Control Toolkit for ASP.NET 3.5 Service Pack 1 and Visual Studio 2008 SP1.
Version 4.1.51116.0
Nov 16 2011 release of the AJAX Control Toolkit for ASP.NET 4.0 and Visual Studio 2010
Feedback to us
Develop and promote your apps in Windows Store
M.R.Nikkan
Member
4 Points
6 Posts
Re: AJAX Calendar Extender Control NOT working
Dec 25, 2012 11:12 AM|LINK
@eager beever
while starting your webapplication add ajax enabled website instead of ajax website
file->new->website->
opens a dialog new web site
in that select ajax enabled website(4th template)
click ok
now open the source and continue with your work