Hi, for the few days im trying to connect the database in c# by creating one class called "datasource". For that I first created a Appication Configuration form in that i've written the follwing code:
<configuration>
<AppSettings>
<add key="ConfigurationString" Value="Datasource=(local);Integrated Security=True; Initial Catalog=HRMSYS"/>
</AppSettings>
</Configuration>
and then in the Datasource class
public static void getconnection
{
get
{
return ConfigurationStrings.AppSettings["ConnectionString"];
}
}
the problems is showing in the above line return ConfigurationStrings.AppSettings['Connection"]
.....
Kindly help me out how to connect the database through class..