المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : How to read connection string from app.config in .net 3.5



C# Programming
04-27-2009, 11:00 AM
Hi,
I'm trying to read connection string from app.config in .net 3.5, as below
string con = ConfigurationSettings.AppSettings["DBConn"];
But, its not working.

App.config file
===============





providerName="System.Data.SqlClient" />



Please let me know how to read. Thanks in advance.