S
S
skvoshiz2015-04-30 13:47:15
Programming
skvoshiz, 2015-04-30 13:47:15

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?
35dc0bae7e58499095bd2d34ef53df55.JPG

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GavriKos, 2015-04-30
@skvoshiz

It is replaced with %23, not %. Encoding/converting to url.

S
sivabur, 2015-05-10
@sivabur

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"); //#

T
Tsiren Naimanov, 2015-05-01
@ImmortalCAT

var sbl = new StringBuilder("path");
sbl.AppendFormat("#");
sbl.AppendFormat("path");
sbl.ToString();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question