Click here to Skip to main content
15,904,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

In a project i am use calendar i am trying use ajax calender extender but the calender does not popup. here is a sample code.but there is no error.can any body help.thanks

XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<script runat="server">
 </script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

        <cc1:CalendarExtender ID="CalendarExtender1" PopupButtonID="TextBox1" PopupPosition="BottomLeft"  Format="yyyy-MM-dd" TargetControlID="TextBox1" runat="server">
        </cc1:CalendarExtender>

        <div>
        </div>
    </form>
</body>
</html>
Posted
Updated 26-Sep-11 18:58pm
v2
Comments
P.Salini 27-Sep-11 0:56am    
When you place the cursor in textbox the calendar must open according to your code.

Are you getting any error.
parithi vr 5-Oct-11 1:41am    
i am not getting error the calender did not popup when i click the textbox.
m@dhu 27-Sep-11 1:01am    
Are you using VS2005 or VS2008?
parithi vr 5-Oct-11 1:41am    
i am using vs2005
member60 27-Sep-11 1:07am    
try the folloeing :

<asp:TextBox ID="txtEndDate" runat="server" CssClass="textbox">
<asp:ImageButton ID="ImageButton1" runat="server" Height="16" Width="16" ImageUrl="~/images/Calendar.png" />
<cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtEndDate"
PopupButtonID="ImageButton1" />

For me your code is working please check it once.

I have added reference to ajaxtoolkit in project and pasted your code
its working fine.
 
Share this answer
 
XML
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                  <cc1:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
                      Enabled="True" TargetControlID="TextBox1">
                  </cc1:CalendarExtender>



use this code it works...
 
Share this answer
 
ASP.NET
<asp:TextBox ID="txtEndDate" runat="server" CssClass="textbox"> <asp:ImageButton ID="ImageButton1" runat="server" Height="16" Width="16" ImageUrl="~/images/Calendar.png" /> <cc1:CalendarExtender ID="CalendarExtender1"  runat="server" TargetControlID="txtEndDate" PopupButtonID="ImageButton1" />



this worked for me .
 
Share this answer
 
v2
Use toolkitscript manager instead of ScriptManager
 
Share this answer
 

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