开发者

QueryString containing \ coming through with \\

I'm have a page which I sent a parameter through the query string.

I开发者_如何学JAVAf I'm retrieving it with Request.QueryString["Format"] I'm having troubles with the type 'CD\DVD'. It's being returned as 'CD\\DVD'. It's important I get this as the right string.

How do I avoid the extra backslash? Or even get rid of it later?


You should try Urlencoding and decoding your querystring

http://msdn.microsoft.com/en-us/library/zttxte6w.aspx


Try doing the following:

Request.QueryString["Format"].Replace(@"\\",@"\");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜