Request.Url
来源:互联网 发布:阿里云没有公网ip 编辑:程序博客网 时间:2024/06/06 16:47
假设当前页完整地址是:http://blog.csdn.net/hashxu/article.aspx?Action=Get&PostId=6858577
【1】获取 完整url
string url=Request.Url.ToString();
url= http://blog.csdn.net/hashxu/article.aspx?Action=Get&PostId=6858577
【2】获取 ID+页面名+参数:
string url=Request.RawUrl;
(或 string url=Request.Url.PathAndQuery;)
url= /hashxu/article.aspx?Action=Get&PostId=6858577
【3】获取 ID+页面名:
string url=HttpContext.Current.Request.Url.AbsolutePath;
(或 string url= HttpContext.Current.Request.Path;)
url= hashxu/article.aspx
【4】获取 域名:
string url=HttpContext.Current.Request.Url.Host;
url= blog.csdn.net
【5】获取 参数:
string url= HttpContext.Current.Request.Url.Query;
url= ?Action=Get&PostId=6858577
阅读全文
0 0
- Request.Url
- Request.Url
- Request获取url信息
- Request Url相关属性
- Request.url用法
- Request与URL
- Request.ServerVariables["Url"]
- request 获取 参数 url
- request.url c#
- request获得URL图解
- Request获取URL
- Request.url用法
- HttpContext.Current.Request.Url
- request中url
- Request.url用法
- request详解之URL
- HttpContext.Current.Request.Url
- Request.UrlReferrer 同Request.Url获取数据
- 源码提供!Android即时通讯和sns开源项目汇总
- 工具类总结(2)-mysql分页工具类
- 语言发展史
- 我的第一个.exe文件
- php排序
- Request.Url
- spring boot实战(第十二篇)整合RabbitMQ
- Spring Boot Controller
- win版git的安装及获取源码踩过的坑(超清晰)
- javascript闭包详解
- Cortex-M3存储器系统
- wifi发射功率查看和设置
- 将WEX5打包的应用设置为开机自启动
- 翻转字符串