user222427
user222427

Reputation:

ajax unknown server tag asp scriptmanager

I have this in my Register

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

But when I drop and drag a scriptmanager into VS2010 i receieve the error ajax unknown server tag asp scriptmanager

<asp:ScriptManager ID="ScriptManager1" runat="server" />

changed it to

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

Still produces the error.

Upvotes: 3

Views: 54720

Answers (4)

Apps Tawale
Apps Tawale

Reputation: 675

just Try this: Add this code in your web.config file

<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

OR

Rebuild your project

Upvotes: 0

Leo Leslin
Leo Leslin

Reputation: 59

Add targetFramework="4.0" in the compilation tag in web.config file.

Upvotes: 3

Oskar Kjellin
Oskar Kjellin

Reputation: 21900

In your system.web you need to add:

<pages>
      <controls>
               <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
      </controls>
  </pages>

Upvotes: 11

Pleun
Pleun

Reputation: 8920

The tagprefix in your @register and the tag in in front of the scriptmanager must match. Also I think you better use the ToolkitScriptManager that comes with the toolkit http://blog.turlov.com/2008/05/scriptmanager-vs-toolkitscriptmanager.html:

In my case it is cc1:

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

and in your <body>

<cc1:ToolkitScriptManager ID="TKSM" EnablePageMethods="true" EnableCdn="true" ScriptMode="Release" runat="server">
</cc1:ToolkitScriptManager>

Upvotes: 6

Related Questions