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

Caching techniques in .NET?

2 Answers   Microsoft,


What is the difference between managed and unmanaged code? *******

2 Answers   Patni,


Can we add code files of different languages in app_code folder?

0 Answers  


What is Bundling and Minification in MVC?

0 Answers   HCL,


What are the different types of events are occured when a client requests an ASP.NET page from IIS server?

0 Answers   Sans Pareil IT Services,






what are the attributes of sitemapnode?

3 Answers   Satyam,


what is purpose of xml control in standard controls of asp.net

1 Answers  


What is ViewState ? and how it is managed ?

1 Answers  


What are the asp.net 2.0 features?

0 Answers  


What is web configuration file and how to use in web application

0 Answers   MCN Solutions,


version information of assembly consist of _________ values.

3 Answers   AG Technologies,


Is asp.net web forms dead?

0 Answers  


Categories