All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
ASP.Net基础学习,HTML控件,简单介绍_[Asp.Net教程]
VBScript实现对Windows注册表的修改_JavaScript技术_编程技术
PHP基础:PHP的语法_[PHP教程]
PHP has encountered an Access Violation解决方法总结_[PHP教程]
让你的ASP.NET虚拟主机也支持子网站_.net资料_编程技术
.NET资源站点汇总_[Asp.Net教程]
c#中域和属性的概念
基于标准的web项目开发模式探索_JavaScript技术_编程技术
使用html表格和CSS进行混合网页设计_[Html教程]
将多次查询的数据填充到同一数据源_.net资料_编程技术
Reading number is top 10 pictures
星星命名法则
The Soviet union swimsuit exposure in the 70 year3
Beautiful Japanese beauty(漂亮的日本美女)3
Perfect small Laurie1
The real super beauty7
南昌铁路局攸县车站125户铁路职工微利房终成骗局
Photographed the passion of the clients and prostitutes in the sex trade picture1
The money of more than 100 countries and regions22
Sora aoi on twitter2
再来随便发几张
Download software ranking
Tram sex maniac 2 (H) rar bag8
Take off clothes to survival
徐若瑄成名作“魔鬼天使”
实战黑客不求人
linux高级编程
尖东毒玫瑰A
Unix video tutorial5
圣殿祭司的ASP.NET.2.0.开发详解-使用C#
matrix1
少妇苏霞全本
delv published in(发表于) 2014/1/10 6:27:59 Edit(编辑)
ASP.NET技巧:URL编码处理_[Asp.Net教程]

ASP.NET技巧:URL编码处理_[Asp.Net教程]

ASP.NET技巧:URL编码处理_[Asp.Net教程]

要解决的问题:
将下面的URL作为一个参数传到其他的页面
1 http://domain/de.apx?uid=12&page=15
2 url后面的参数中出现汉字等,如: ....aspx?title=起重机
在出现上面的情况的时候,必须经过一个RUL编码和解码的过程,否则会出现错误.
代码如下:


1//传值
2string temp = " 添加到收藏夹");
3
4//在另外一个文件中取从上面传的值
5if (Request.QueryString["url"] != null)
6 {
7 string url = Server.UrlDecode(Request.QueryString["url"].ToString());
8 this.txtAddress.Text = url;
9 }
10 if (Request.QueryString["title"] != null)
11 {
12 string title = Server.UrlDecode(Request.QueryString["title"].ToString());
13 this.txtTitle.Text = title;
14 }


来源:网络







添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.