asp.net - Escaping backslashes in string.replace -
i have image control following string
http://test.site.com\content\images\productimages\73\700-4aad-be94-e0b79982951f_0_chrysanthemum__product_search.jpg
i want replace string cleartext=imagepath.replace("\","/");
backslash causes problem -- how can replace backslash?
you can escape string characters individually "\" or can change string string literal prefixing @
.
documentation available @ msdn: http://msdn.microsoft.com/en-us/library/aa691090(v=vs.71).aspx.
another resource understanding how strings work in c# is: http://csharpindepth.com/articles/general/strings.aspx.
Comments
Post a Comment