In my current project, the user writes a file path (Example: "C:\Data") into a Textbox. Then I read it with:
string PathInput = tbPath.Text;
And then send it into an SQL Insert Query.
If I then read the data from SQL, I get back: C:Data
So I tried to do:
string Path = PathInput.Replace(@"\", "\\");
So that it would double the \\, because when I enter C:\\Data I get C:\Data. But it looks like the \ get lost in Textbox and not in Database.
So, how can I read the TextBox without losing the \s?