我试图创建一个Web应用程序的自定义HttpModule
。在模块中,我正在编写会话变量。这适用于除Ajax ScriptManager
之外的页面。当页面加载时,我得到了可怕的'Sys' is undefined
。这只发生在ScriptManager
的页面上。为了调试问题,我从应用程序中删除了我的HttpModule
,并将代码移到了应用程序中的global.asax中。现在,这是唯一的事件方法我有我的Global.asax:ASP.Net自定义的HttpModule
void Application_PreRequestHandlerExecute(object sender, EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
application.Session["aVariable"] = "some value";
}
具有ScriptManager
任何页面/母版页抛出一个或多个"'Sys' is undefined"
错误。
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
应用程序是在.NET 3.5。
请帮忙。