I am learning ASP.net Ajax. I want to pull data from a db table and populate it on a grid as shown in the following tutorial.
http://dotnetslackers.com/articles/ajax/aspnetajaxgridandpager.aspx
<asp:ScriptManager ID="TheScriptManager" runat="server">
<Services>
<asp:ServiceReference Path="~/DataService.asmx" />
</Services>
</asp:ScriptManager>
<ajax:Grid 开发者_开发技巧ID="grid1" runat="server"></ajax:Grid>
I have added reference to "ajaxcontroltoolkit.dll"
But I am getting the error "Unknown server tag 'ajax:Grid' ". After some search I found this solution from the following website.
http://www.dotnetspider.com/forum/271778-DataGrid-AJAX.aspx
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1 or asp" %>
But this solution is not working for me.
How can I resolve this error.
Thanks in advance.
Try changing the TagPrefix attribute to "ajax" instead of "cc1 or asp".
I have discovered some problem with this project. So, inside Northwind solution we have two projects: web site Northwind and library Ajax.Control. What you have mentioned in your question was a control from this library. But, unfortunately, in my case, I have revealed that library was build using Framework 2.0 version but contain a reference to namespace System.Web.Extensions which belong as minimum to Framework 3.5. So, I have change target framework for Ajax.Control project to Framework 3.5 and all is working now.
精彩评论