使用HttpModule控制SharePoint页面跳转
2012-07-18 21:28
363 查看
使用HttpModule控制SharePoint页面跳转,代码后续会贴上
public class SwithPages
{
public void Dispose()
{
}
Public void Init(HttpAppliation context)
{
if(context!=null)
{
context.PreRequestHandlerExcute+=new EventHandler(context_PreRequestHandlerExcute);
}
}
void context_PreRequestHandlerExcute(object sender,EventArgs e)
{
//以下这句话代码要注意,在sharepoint页面中,跳转到目的页面后,如果使用其他方式
//获取页面,而不是以下方式,那么用F5刷新页面,会出现加载失败sharepoint内置的一些js
Page page=HttpContext.Current.CurrentHandler as Page;
if(page!=null)
{
page.PreInit+=new EventHandler(page_PreInit);
}
else
{
}
}
void page_PreInit(object sender,EventArgs e)
{
//add to do
}
}
public class SwithPages
{
public void Dispose()
{
}
Public void Init(HttpAppliation context)
{
if(context!=null)
{
context.PreRequestHandlerExcute+=new EventHandler(context_PreRequestHandlerExcute);
}
}
void context_PreRequestHandlerExcute(object sender,EventArgs e)
{
//以下这句话代码要注意,在sharepoint页面中,跳转到目的页面后,如果使用其他方式
//获取页面,而不是以下方式,那么用F5刷新页面,会出现加载失败sharepoint内置的一些js
Page page=HttpContext.Current.CurrentHandler as Page;
if(page!=null)
{
page.PreInit+=new EventHandler(page_PreInit);
}
else
{
}
}
void page_PreInit(object sender,EventArgs e)
{
//add to do
}
}
相关文章推荐
- 在HttpModule中使用gzip,deflate协议对aspx页面进行压缩(转)
- httpModule控制url跳转
- 在HttpModule中使用gzip,deflate协议对aspx页面进行压缩
- 使用HttpModule(给页面添加页头和页尾,重写URL)
- 如何使用NetScaler实现http页面跳转https
- 在HttpModule中使用gzip,deflate协议对aspx页面进行压缩
- ASP.NET:使用HttpModule(给页面添加页头和页尾,重写URL)
- Asp.net下使用HttpModule模拟Filter,实现权限控制
- ASP.NET:使用HttpModule(给页面添加页头和页尾,重写URL)
- 用HttpModule控制或修改页面。
- 使用pushState实现微信“返回”按钮控制单页应用页面的无刷新跳转
- 使用HttpModule实现网址重写和HttpHandler实现页面静态化冲突的解决办法
- 页面重定向----使用HttpModule实现多个域名分别“绑定”到子目录
- 使用pushState实现微信“返回”按钮控制单页应用页面的无刷新跳转
- 用HttpModule控制或修改页面基类。
- 利用 httpmodule 强制所有页面使用同一基类
- Asp.net下使用HttpModule模拟Filter,实现权限控制
- (待测试) html 页面跳转效果(http-equiv 标签使用)
- idea jsp使用action跳转控制层的页面,路径没有项目名字
- 如何使用jquery控制页面几秒钟后跳转到其他页面