Click here to Skip to main content
15,894,646 members

Comments by Rahul Kumar Ghosh (Top 2 by date)

Rahul Kumar Ghosh 29-Apr-13 18:38pm View    
how can i remove double \\ and make it single \ in the code, because in the textbox it's not showing double \\ it's showing single \, but within the code using breakpoint i saw it is double \\
My code --
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "C:\\Program Files\\Microsoft SQL Server\\MSSQL10_50.MSSQLSERVER\\MSSQL";
openFileDialog1.Filter = "Database files (*.mdf)|*.mdf";
openFileDialog1.FilterIndex = 2;
openFileDialog1.RestoreDirectory = true;

if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
string file = openFileDialog1.FileName.Replace("\\" , @"\");
txtFileName.Text = file;
Rahul Kumar Ghosh 12-Apr-13 16:40pm View    
I am having same problem but a bit different.
I have made App.config file provided all the values of the connection string and a separate class named "SQLCONNECTION.cs" too and provided same values for it also, but in both the cases when I need to change my password or server name i have to do it in coding.
But i want something that would made that class (SQLCONNECTION.cs) or App.config file take user inputs (Server Name, User Name, Password) from a WindowsForm and save it till the user want to change it again.
Any Solution.. ?
rahulghosh.0101@gmail.com