惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
F
Fortinet All Blogs
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Security Blog
Microsoft Security Blog
Blog — PlanetScale
Blog — PlanetScale
月光博客
月光博客
腾讯CDC
小众软件
小众软件
G
Google Developers Blog
V
Visual Studio Blog
罗磊的独立博客
GbyAI
GbyAI
V
V2EX
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
L
LangChain Blog
Engineering at Meta
Engineering at Meta
量子位
The GitHub Blog
The GitHub Blog
博客园 - 司徒正美
WordPress大学
WordPress大学
B
Blog RSS Feed

博客园 - Suntears

InputBox函数用法 MsgBox用法 【转】我的悲哀——虽然是转载,但同样是我自己的悲哀 asp.net中将DataTable根据xslt生成html静态页面,支持分页 javascript中keyCode代码对应表(函数实现) - Suntears - 博客园 asp.net+ajax多线程进度条的实现 - Suntears - 博客园 asp.net进度条的实现(附demo) asp.net进度条的实现(纯个人收藏) 高度获得相关代码 - Suntears - 博客园 c#去除url中的param参数的函数 - Suntears - 博客园 如何实现js的重载 临时让别人登录你的qq邮箱,却又不想让他知道密码的方法 asp.net中面向对象传值方法 如何在webform.aspx.cs中控制用户控件的属性 如何让一个iframe自动调整大小 eBay起家 如何向用户控件传递参数 [转]asp.net中窗口相关操作总结(javascript) [转]JavaScript页面跳转常用代码
在url中去除指定参数的c#代码
Suntears · 2007-03-22 · via 博客园 - Suntears

 1        private string buildurl(string url,string param)
 2        {
 3            string url1=url;
 4            if(url.IndexOf(param)>0)
 5            {
 6                if(url.IndexOf("&",url.IndexOf(param)+param.Length)>0)
 7                {
 8                    url1=url.Substring(0,url.IndexOf(param)-1)+url.Substring(url.IndexOf("&",url.IndexOf(param)+param.Length)+1);
 9                }

10                else
11                {
12                    url1=url.Substring(0,url.IndexOf(param)-1);
13                }

14                return url1;
15            }

16            else
17            {
18                return url1;
19            }

20        }

要去除多个参数,这么使用就可以了。buildurl(buildurl(buildurl(url,param1),param2),param3)