当前位置:编程学习 > C#/ASP.NET >>

加入微软官网的防止重复提交的MsdnModule后,TreeView类的打开和关闭树形功能不能使用了。

<httpModules>   
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
     
<add name="MsdnModule" type="Msdn.RefreshModule, MsdnExt"/> /*加入微软官网的防止重复提交的MsdnModule */
</httpModules>

我把第二个Module取消后,又能正常使用TreeView类。


--------------------编程问答-------------------- module代码如下:
namespace Msdn
{
public class RefreshModule : IHttpModule,IRequiresSessionState
{
// ***********************************************************
// IHttpModule::Init
public void Init(HttpApplication app)
{
// Register for pipeline events
app.AcquireRequestState += new EventHandler(this.OnAcquireRequestState);
}
// ***********************************************************

// ***********************************************************
// IHttpModule::Dispose
public void Dispose() 
{
}
// ***********************************************************


// ***********************************************************
// Determine if a F5 or back/fwd action is in course
private void OnAcquireRequestState(object sender, EventArgs e)
{
// Get access to the HTTP context 
HttpApplication app = (HttpApplication) sender;
HttpContext ctx = app.Context;

// Check F5 action
RefreshAction.Check(ctx);

return;
}
// ***********************************************************
}
} --------------------编程问答-------------------- public class RefreshModule : IHttpModule
改成
public class RefreshModule : IHttpModule,IRequiresSessionState

搞定
补充:.NET技术 ,  ASP.NET
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,