Missing backslahes in filename using C#
- by CL4NCY
Hi,
I have a string literal as follows:
string filename = @"C:\myfolder\myfile.jpg";
When I use File.Exists(filename) it works most of the time but sometimes I get an error saying the following file doesn't exist:
C:myfoldermyfile.jpg
Something seems to strip the backslashes out of the filename. This code is sometimes accessed via an ajax request.
Does anyone know why/how this could be happening?