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(@"\\",@"\");
精彩评论