日期:2014-05-18  浏览次数:20459 次

如何让原有的程序支持AJAX
我原来建立了一个非AJAX网站,现在有个功能想使用AJAX,于是我改了配置文件,可以拖一个ScriptManger控件时老是提示:服务器标记“asp:ScriptManager”不明确。请修改导致此多义性的关联注册并选取新的标记,是不是我哪里做的不对,正确的应该怎么做

------解决方案--------------------
修改后的Web.Config保存了吗?你用的是VS2005吗?
------解决方案--------------------
下载并安装 Ajax 后即可正常使用
具体方法请看:
http://www.cnblogs.com/njnudt/archive/2007/06/19/788638.html
------解决方案--------------------
Web.Config 要加入很多东西的。

你建立一下Ajax站点,看看人家的Web.Config里面有什么。
------解决方案--------------------
主要是web.config文件

可以创建一个ajax项目 然后对照该项目中的web.config文件 来修改
------解决方案--------------------
服务器标记“asp:ScriptManager”不明确
你可能配置为 AjaxControlToolkit 而你直接拖的ajax 产生的配置为 
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>

把上面的替换成下面的 错误就解决了
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
------解决方案--------------------
ajax版的WEBCONFIG
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this