When i try to implement ajax in usercontrol its giving error "System.Web.HttpParseException: The base class includes the field 'UpdatePanel1',
but its type (System.Web.UI.UpdatePanel) is not compatible with the type of
control (System.Web.UI.UpdatePanel)."
I'm using .net 3.5 sp1, MS ASP.NET 2.0 Ajax extensions 1.0 and IIS version is 5.1
Error Implementing ajax
Hi all,
When i try to implement ajax in usercontrol its giving error "System.Web.HttpParseException: The base class includes the field 'UpdatePanel1', but its type (System.Web.UI.UpdatePanel) is not compatible with the type of control (System.Web.UI.UpdatePanel)."
I'm using .net 3.5 sp1, MS ASP.NET 2.0 Ajax extensions 1.0 and IIS version is 5.1
My user control code is:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ajaxTest.ascx.cs" Inherits="ajaxTest" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
<asp:Button ID="Button1" runat="server" Text="Click" onclick="Button1_Click" />
<asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="UpdatePanel1 not refreshed yet."></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
.cs files is :
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "UpdatePanel1 refreshed at: " +
DateTime.Now.ToLongTimeString();
}
Also i added <asp:ScriptManager runat="server"></asp:ScriptManager> in master page.
To implement ajax, do i need to make changes in web.config or any other files. please guide me through to implement ajax.
You have to make changes to webconfig and also add reference to appropriate library in your project file if required.
The Ajax versions are different. If you want to use the AJAX included in 3.5 SP1 add the folowing code to the end of the web.config:
hth, Thomas
Thanks Thomas...
That made it work :)
i tried it in umrbaco 4.7 but it does not work
is working on a reply...