Hi ,
BY THE WAY Common is class and maybe it doesn't exist :)
your problem in connection string try to use it like this.
<connectionStrings>
<add name="testConnectionString" connectionString="Data Source=.;Initial Catalog=test;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
Code Behind
protected void Page_Load(object sender, EventArgs e)
{
DataReaderFromSqlAccess();
}
public void DataReaderFromSqlAccess()
{
string strSql = "Select * from Emp_Details";
try
{
using (SqlConnection cnn = new SqlConnection(ConfigurationManager.ConnectionStrings["testConnectionString"].ConnectionString)
)
{
using (SqlCommand cmd = new SqlCommand(strSql, cnn))
{
cnn.Open();
using (SqlDataReader dr = cmd.ExecuteReader())
{
while (dr.Read())
{
xxx =(String.Format("{0} {1}",
dr["empid"], dr["password"]));
}
}
}
}
}
catch (Exception ex)
{
}
}
Best Regards
M.Mitwalli