Link to home
Start Free TrialLog in
Avatar of GlobaLevel
GlobaLevelFlag for United States of America

asked on

asp.net - ajax kit not working...

I dragged the AjaxControlToolkit.dll to the toolbox in vs 2008 ..and I see the ConfirmButtonExtender in the toolbox...yet i get this err:


Error      6      Type 'AjaxControlToolkit.ConfirmButtonExtender' does not have a public property named 'ConfirmButtonExtender'.      C:\Documents and Settings\\WebSite76\Default.aspx      15      

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

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

<!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:confirmbuttonextender ID="Confirmbuttonextender1" runat="server">
    <ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server"
    TargetControlID="LinkButton1"
    ConfirmText="Are you sure you want to click this?"
    OnClientCancel="CancelClick" />

</asp:confirmbuttonextender>
    </div>
    </form>
</body>
</html>

Open in new window

Avatar of guru_sami
guru_sami
Flag of United States of America image

Why do you have nested confrimButtonExtenders?
Is that a copy+paste issue here or even in you code you have it like that:
Try this:
<div>
<asp:confirmbuttonextender ID="Confirmbuttonextender1" runat="server"
    TargetControlID="LinkButton1"
    ConfirmText="Are you sure you want to click this?"
    OnClientCancel="CancelClick" />

    </div>

Open in new window


You will also need  LinkButton1 on your page.

Avatar of GlobaLevel

ASKER

This is the error I get now:

Microsoft JScript runtime error: AjaxControlToolkit requires ASP.NET Ajax 4.0 scripts. Ensure the correct version of the scripts are referenced. If you are using an ASP.NET ScriptManager, switch to the ToolkitScriptManager in AjaxControlToolkit.dll

Im using vs 2008....whihc is 3.5 and I am using the AjaxControlToolkit.dll 3.5....


current code:


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

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

<!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:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
<asp:confirmbuttonextender ID="Confirmbuttonextender1" runat="server"
    TargetControlID="LinkButton1"
    ConfirmText="Are you sure you want to click this?"
    OnClientCancel="CancelClick" />

    </div> 


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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial