Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Simple ajax asp.net calendar extender not working

I've made a new project with one page and a reference to AjaxControlToolkit.dll

The calendar extender below doesn't work, what have I done wrong?

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>

    <form id="form1" runat="server">
    <div>    
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <ajaxToolkit:CalendarExtender runat="server" TargetControlID="TextBox1" CssClass="ClassName" Format="MMMM d, yyyy" />
    </div>
    </form>
</body>
</html>
like image 696
user23048345 Avatar asked Jun 01 '10 14:06

user23048345


2 Answers

Try using the ajaxtoolkit ScriptManager instead of the asp one..everything else looks fine

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" > </ajaxToolkit:ToolkitScriptManager>
like image 80
Ed B Avatar answered Nov 11 '22 11:11

Ed B


No, Its what ever you set the tagPrefix as, It could be cc1 or asp or ajaxToolkit

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
like image 23
user1429635 Avatar answered Nov 11 '22 12:11

user1429635