1. 在VS2005的Bin文件中添加对System.Web.Extensions.dll的引用,web.config 中<assemblies></assemblies>之间自动添加对<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>的引用:
for:
<assemblies>
<add assembly="System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31BF3856AD364E35"/>
........
</assemblies>
2. 在server BIN文件夹下添加文件System.Web.Extensions.dll
3.
在<system.web></system.web>之间,在<pages></pages>之后添加以下代码:
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd"
validate="false" type="System.Web.Script.Services.ScriptHandlerFactory,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd"
type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions,
Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule,
System.Web.Extensions, Version=1.0.61025.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
4. 在aspx页面添加:
1>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
2>
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
3>
<asp:UpdatePanel ID="UpdatePanel1" runat="server"
>
<ContentTemplate>
需要刷新的内容
</ContentTemplate>
</asp:UpdatePanel>
4>
<asp:UpdateProgress
ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1"
>
<ProgressTemplate>
<div
class="PleaseWait">
Loading......
</div>
</ProgressTemplate>
</asp:UpdateProgress>
5. 在CSS中添加
.PleaseWait{
height:100px;
width:400px;
background-image:url(../images/Green_Big_Rotate.gif);
padding-left:150px;
line-height:80px;
position: fixed;
_position: absolute;
top:40%;
font-size:30px;
}
OK, 终于可以实现局部刷下了......
VS2005中配置 ScriptManager,UpdatePanel等AJAX控件 .,布布扣,bubuko.com
VS2005中配置 ScriptManager,UpdatePanel等AJAX控件 .
原文地址:http://www.cnblogs.com/nancyzhang/p/3719356.html