简体   繁体   中英

asp.net C# Request.QueryString[“sms”] + sign

my client have 2 server and from first server then want to send a request with some parameters and the second server take those parameters with get method, the problem is when the request come there is a + sign in it for eg in blood group its A+, B+, O+

The data is coming fine but when I am inserting the record its removing + sign from it.

how can I get it done, as there is some space between them.

get method

http://domain.com/join.aspx?msid=238487987328&sms=Peter D 23 O+ Indiana

when I am getting it with Request.QueryString["sms"] its removing + sign

Thanks Regards

您需要参数进行URL编码 (或者整个URL)。

The + sign is the encoded version of a space, and therefore need URL Encoding to preserve it.

In fact, you need to URL Encode any URL passed parameters, make a note for the future!

编码+号,然后将其添加到您的查询字符串

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM