Answer the question
In order to leave comments, you need to log in
How to replace %23 with # in URL?
Hello, I am using the xNet library to work with requests.
The problem is that:
- The program makes a GET request and is redirected to /wall84639214_41572 # post84639214_41572
- And the program is redirected to /wall84639214_41572 %23 post84639214_41572
The # sign given in the redirect links itself is replaced by %23
What could be the problem?
Answer the question
In order to leave comments, you need to log in
So it's okay! All browsers replace! Read about url encode/decode.
Functions in c#
System.Web.HttpUtility.UrlEncode("#"); //%23
System.Web.HttpUtility.UrlDecode("%23"); //#
var sbl = new StringBuilder("path");
sbl.AppendFormat("#");
sbl.AppendFormat("path");
sbl.ToString();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question