Reputation:
I am using UrlRewritingNet.UrlRewriter.dll for url rewriting purpose and frankly, I am new to this stuff. My problem is that , i want to replace %20 in my url with -.
Upvotes: 3
Views: 5049
Reputation: 1075
or you can put the url in a string then use
string urla = "your url";
string urlb = url.Replace("%20", "-");
Upvotes: 0
Reputation: 12534
If you need a custom replace apart that HttpUtility gives you (in this case it will convert it to space!) then just use string replacement.
Uri myuri = new Uri(myolduri.ToString().Replace("%20","-"));
Upvotes: 2