博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
HttpContext.Current.RewritePath方法重写URL
阅读量:7234 次
发布时间:2019-06-29

本文共 639 字,大约阅读时间需要 2 分钟。

if (!IsPostBack) {                //如果请求ID为空,则重写URL为:~/index.aspx?ID=shouji.115sou.com                if (Request.QueryString["ID"]==null || Request.QueryString["ID"].Trim()=="")                {                    HttpContext.Current.RewritePath("~/index.aspx?ID=shouji.115sou.com");                }                Response.Write(Request.QueryString["ID"]); }

  

  Name Description
Public method RewritePath(String) 重写URL的路径
Public method RewritePath(String, Boolean) 重写URL的路径和一个布尔值,指定是否对服务器资源虚拟路径的修改。
Public method RewritePath(String, String, String) 重写URL通过使用给定的路径,路径信息,和查询字符串信息。
Public method RewritePath(String, String, String, Boolean) 重写URL使用给定的虚拟路径,路径信息,查询字符串信息,和一个布尔值,指定是否客户端文件路径设置为重写路径。

转载地址:http://kzpfm.baihongyu.com/

你可能感兴趣的文章
走迷宫(回溯、深搜)判断能否到终点
查看>>
Zookeeper权限管理与Quota管理
查看>>
CORS 详解
查看>>
【原】iOS学习之苹果原生代码实现Autolayout和VFL语言
查看>>
ASP.NET MVC中使用FluentValidation验证实体
查看>>
usb mass storage device
查看>>
CentOs7
查看>>
python3封装Api接口
查看>>
jar包双击执行引用外部包问题
查看>>
OI复习计划
查看>>
about
查看>>
O-Bomb(数位dp)
查看>>
hdu5032 点和查询分别按极角排序 离线做+树状数组
查看>>
hdu1428 递归形式dp(记忆化搜素):A能到B的条件是A到目的地最短路大于B到目的地最短路...
查看>>
实例详解Django的 select_related 和 prefetch_related 函数对 QuerySet 查询的优化(三)...
查看>>
关于VC++6.0 MFC项目运行所需的动态链接库
查看>>
由system.currentTimeMillis() 获得当前的时间
查看>>
复习日记-Linux项目发布
查看>>
The 'Microsoft Jet OLEDB 4.0 Provider' is not registered on the local machine
查看>>
Java 基础源码 switch语句判断指定月份属于一年中的哪个季度
查看>>