c# - How to Store file path in asp.net MVC4 -
this question has answer here:
hi need store file path of folder on string variable in asp.net mvc 4 when i'm using following method shows error
unrecognized escape sequence
static string path="c:\path";
what reason of error , how can solve this????
you need escape '\' '\', so:
static string path="c:\\path";
or put '@' in front of so:
static string path = @"c:\path";
duplicate: unrecognized escape sequence path string containing backslashes
related reading: 2.4.4.5 string literals
Comments
Post a Comment