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

Explain the differences between Server-side and Client-side code?

3 Answers  


while developing webservices if i want some users to use my webservice only how can i give security to my webservice?

0 Answers  


Why is this service branded with windows livetm?

0 Answers  


Types of instancing properties and explain each. Tell the difference between multiuse,singleuse and globalmultiuse and which is default ?

0 Answers   DELL,


What is _viewstart?

0 Answers  


What is a Repeater Control and how does it works? and what is the diffrence b/w Gridview,datalist and repeater control?

2 Answers   USi,


Whats the use of @ Register directives ?

4 Answers  


How can i include both C# and vb.net classes in same solution?

2 Answers  


What is the use of response redirect in asp.net?

0 Answers  


What is the best Macanism to clear the Cache in asp.net

0 Answers   MCN Solutions,


What is Difference between Callbacks and Postback in ASP.NET?

1 Answers   Patni,


if i want to give an alert message like "try after sometime" to a web page which is being seen by other person.if a web page is not seen by anyone then it should display otherwise it show a display a message stating that other person is viewing so try after some time........how can i implement this.

0 Answers   Siemens,


Categories