c# – 未知服务器标签cc1:ToolkitScriptManager
作者:互联网
我正在使用ajaxcontrols并且所有控件都运行良好但是我没有找到任何名为ToolkitScriptManager的控件,所以我刚刚在.html页面中复制了这个标签.
我该怎么办?
托管服务器中的框架版本为2.
我的Web.config文件是:
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
</controls>
</pages>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" TagPrefix="cc1"/>
<bindingRedirect oldVersion="3.5.0.0" newVersion="1.0.61025.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
Aspx页面:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CS.aspx.cs" Inherits="CS" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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>
<style type="text/css">
.Star
{
background-image: url(images/Star.gif);
height: 17px;
width: 17px;
}
.WaitingStar
{
background-image: url(images/WaitingStar.gif);
height: 17px;
width: 17px;
}
.FilledStar
{
background-image: url(images/FilledStar.gif);
height: 17px;
width: 17px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</cc1:ToolkitScriptManager>
<cc1:Rating ID="Rating1" AutoPostBack="true" OnChanged="OnRatingChanged" runat="server"
StarCssClass="Star" WaitingStarCssClass="WaitingStar" EmptyStarCssClass="Star"
FilledStarCssClass="FilledStar">
</cc1:Rating>
<br />
<asp:Label ID="lblRatingStatus" runat="server" Text=""></asp:Label>
</form>
</body>
</html>
解决方法:
尝试使用ajaxToolkit前缀.
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>
同等的评级控制.
标签:c,ajaxcontroltoolkit 来源: https://codeday.me/bug/20190717/1491162.html