Replacing delimiter characters in file path
- by salvationishere
I'm developing a C# web application in VS 2008. I let the user select an input file and then I store the file path in a string variable. However, it stores this path as "C:\\folder\\...". So my question is how do I convert this file path into single "\"?
To clarify more, this is my code in context. Currently it is entering the If Directory does not Exist section.
protected void btnAppend_Click(object sender, EventArgs e)
{
string fullpath = Page.Request.PhysicalPath;
fullpath.Replace('\\', '\');
if (!Directory.Exists(fullpath))
{
string msg = "<h1>The upload path doesn't exist: {0}</h1>";