private string buildurl(string url,string param)
        
{
            
string url1=url;
            
if(url.IndexOf(param)>0)
            
{
                
if(url.IndexOf("&",url.IndexOf(param)+param.Length)>0)
                
{
                    url1
=url.Substring(0,url.IndexOf(param)-1)+url.Substring(url.IndexOf("&",url.IndexOf(param)+param.Length)+1);
                }

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

                
return url1;
            }

            
else
            
{
                
return url1;
            }

        }
去除多个如下使用:buildurl(buildurl(buildurl(url,param1),param2),param3)))
posted on 2007-04-12 14:52  Suntears  阅读(1838)  评论(3编辑  收藏  举报
点击这里给我发消息