现在的位置: 首页 > 综合 > 正文

WebForm_DoPostBackWithOptions 丢失的解决

2012年09月15日 ⁄ 综合 ⁄ 共 597字 ⁄ 字号 评论关闭
由于采用了一个过滤器,导致WebForm_DoPostBackWithOptions丢失的错误。

解决办法:

判断请求是否 /WebResource.asxd,是则跳过去

private void Application_BeginRequest(object sender, EventArgs e)
        {
            HttpApplication httpApp 
= (HttpApplication) sender;

            if(httpApp.Request.RawUrl.IndexOf("/WebResource.axd"< 0)
            {
                m_ResponseStream 
= new GBConvertStream(httpApp.Response.Filter, httpApp.Context);
                httpApp.Response.Filter 
= m_ResponseStream;
                httpApp.Context.Items[
"culture"= ShouldProcessBig5(httpApp.Request) ? "zh-tw" : "zh-cn";
            }           
        }


抱歉!评论已关闭.