Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I couldn't able to get rid of this problem.
Ajax Calender extender does not pop up on click of button.
help me.
following is code:

XML
<%@ Page Language="C#" MasterPageFile="~/SmileMaster.master" AutoEventWireup="true" CodeFile="SummaryReport.aspx.cs" Inherits="SummaryReport" Title="Summary Report" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>


XML
<asp:TextBox ID="txtFrom" runat="server" Width="144px"></asp:TextBox>&nbsp;<asp:Button
                                       ID="btnFrom" runat="server" Text="..." />
                                   <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd-MM-yyyy" PopupButtonID="btnFrom"
                                       TargetControlID="txtFrom">
                                   </cc1:CalendarExtender>
Posted

Your code is 100% perfect. It seems you are using Visual Studio 2005. This problem happens in VS2005, because you are creating a general website. Try choosing AjaxEnabledWebsite from your template. Go to File -> New -> WebSite then choose AjaxEnabledWebsite. It'll work. And also make sure that AjaxControlToolkit is installed in your PC.



--Amit
 
Share this answer
 
Comments
Pankaj Nikam 5-Aug-12 5:31am    
Yea that might be the case. Even the problem might be incorrect version of the toolkit itself. I believe there are different versions of toolkit for each of the framework type. +5 from my side.
_Amy 5-Aug-12 6:20am    
Thank you. !
Instead of

ASP.NET
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
</asp:scriptmanager>


Try

ASP.NET
<cc1:toolkitscriptmanager id="ScriptManager1" runat="server" xmlns:cc1="#unknown">
</cc1:toolkitscriptmanager>


And by the way, as you are using it inside a content page, it would be convinient to use the ToolkitScriptManager in the Master page.
 
Share this answer
 
Comments
Sant Osha 4-Aug-12 7:28am    
this not working... help me
Pankaj Nikam 4-Aug-12 8:05am    
What error are you getting?
Sant Osha 4-Aug-12 8:11am    
not any errors..
button click doesn't shows calender
Pankaj Nikam 4-Aug-12 8:16am    
Use the ToolkitScriptManager in the master page. Make sure that it is just below the form tag.
Sant Osha 4-Aug-12 8:21am    
i had used ToolkitScriptManager in the master page.
but its not working
ASP.NET
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
   </asp:scriptmanager>
   <asp:updatepanel id="UpdatePanel1" runat="server" xmlns:asp="#unknown">
       <contenttemplate>
           <asp:textbox id="txtFrom" runat="server" width="144px"></asp:textbox> <asp:button>
               ID="btnFrom" runat="server" Text="..." />
           <cc1:calendarextender id="CalendarExtender1" runat="server" format="dd-MM-yyyy" popupbuttonid="btnFrom" xmlns:cc1="#unknown">
               TargetControlID="txtFrom">
           </cc1:calendarextender>
       </asp:button></contenttemplate>
   </asp:updatepanel>
 
Share this answer
 
Comments
Sant Osha 4-Aug-12 7:28am    
this is not working..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900