Hi there, my simple page in asp.net with ajax does not work... and i don't understand why...

I have a button where i applied an ConfirmButtonExtender
I have a textbox where i applied an calendarextender
but if i run the page this simple ajax does not work...

I guess i am missing some code somewhere, maybe in the web.config..

I copy the code of the page down here, thanks for your help!!!

Default.aspx

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

        <!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></title>
        </head>
        <body>
            <form id="form1" runat="server">
            <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>


                <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />


                <AjaxControlToolkit:ConfirmButtonExtender ID="Button1_ConfirmButtonExtender" 
                    runat="server" ConfirmText="Are you sure?" Enabled="True" 
                    TargetControlID="Button1">
                </AjaxControlToolkit:ConfirmButtonExtender>

            <asp:textbox ID="Textbox1" runat="server"></asp:textbox>
                <ajaxcontroltoolkit:calendarextender ID="Calendarextender1" TargetControlID="Textbox1" runat="server"></ajaxcontroltoolkit:calendarextender>

            </div>
            </form>
        </body>
        </html>

web.config

<?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
            </assemblies>
        </compilation>
        <pages>
            <controls>
                <add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagPrefix="AjaxControlToolkit"/>
            </controls>
        </pages>
    </system.web>
</configuration>

If you can tell me zhat i missi to make this page working, will be great!!

Hi,

You need to register Ajaxcontroltoolkit in the page.

What error are you getting?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.