-1
string url = @"..\" + row.Field<String>(1).Replace("photo",@"photo\");
url.Replace(@"\\", @"\");

i´m trying to put a single backslash but c# put that as \\

1 Answers1

0

did you try something like the following?

string url = @"..\" + row.Field(1).Replace("photo",@"photo\"); url = url.Replace(@"\", @"\");

i,e add "url = " assigning.

  • 1
    `url = url.Replace(@"\", @"\");` I'm not sure that actually does anything, since you are replacing a string with the same string... – Ron Beyer Oct 16 '15 at 19:48