I have a number of query strings looks like View.aspx?type=a&boo=bar&i=1
How to remove all parameters' values so it would become View.aspx?type=&boo=&i=
For each string set of parameters there is it's own combination of parameters, 2-3 in num开发者_JAVA技巧ber.
Edit: How to remove all parameters except specific set?
For all parameters
Regex.Replace(source, "=.+?(&|$)", "=$1")
To skip parameters "archive" and "boo":
Regex.Replace(source, "(?<![?&]archive|[?&]boo)=.+?(&|$)", "=$1",
    RegexOptions.IgnoreCase)
You want to do this inside that page? Why not forward the page to itself without parameters? Maybe I am missing the point. Care to explain a little more?
Use System.Uri, or System.UriBuilder
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论