How To Generate ConnectionString By Using Notepad??

Answers were Sorted based on User's Feedback



How To Generate ConnectionString By Using Notepad??..

Answer / kesavan

string connString = System.IO.File.ReadAllText(filePath);

Is This Answer Correct ?    2 Yes 0 No

How To Generate ConnectionString By Using Notepad??..

Answer / kesavan

StreamReader fStream = new StreamReader(Application.StartupPath + "/Coninfo.ini");
fStream.BaseStream.Seek(0, SeekOrigin.Begin);
companyId = fStream.ReadLine().ToString().Substring(20);
ComPanyName = fStream.ReadLine().ToString().Substring(20);
serverName = fStream.ReadLine().ToString().Substring(20);
userId = fStream.ReadLine().ToString().Substring(20);
Password = fStream.ReadLine().ToString().Substring(20);
dataBase = fStream.ReadLine().ToString().Substring(20);
dbPath = fStream.ReadLine().ToString().Substring(20);
dbType = fStream.ReadLine().ToString().Substring(20);
fStream.Close();

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What are resource file and how do we generate resource file?

0 Answers  


Will session work if cookies is disabled?

0 Answers  


How .net CLR works with n-tier application

4 Answers   HCL, Hughes,


what is differences between bind and eval?

2 Answers  


Will the asp.net validators run in server side or client side?

0 Answers  






What is difference b/w Generic List and Arraylist, Generic List Vs HashTable, Generic List Vs No Generic? Pls Explain with example.

2 Answers   Polaris, Syntel,


can s/w quality assurance engineer switch field to programming side i m very much interested in programming but not much good in it

0 Answers  


In a webpage if i want to give access to only half page ,then what should i do?

3 Answers  


What is Web API?

0 Answers  


What is the use of Administration tool in Asp.net 2.0?

2 Answers  


What is voluum?

0 Answers  


What are the differences between clr & cts?

0 Answers  


Categories