Error in connecting when using the web config file in asp.net using C#
in .aspx code as followsprotected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.BindGrid();
}
}
private void BindGrid()
{
string strConnString = ConfigurationManager.ConnectionStrings["dbconnection"].ConnectionString;
using (SqlConnection con = new SqlConnection(strConnString))
{
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText ="select Tb_Employee";
cmd.Connection = con;
con.Open();
gvEmpdetails.DataSource = cmd.ExecuteReader();
gvEmpdetails.DataBind();
con.Close();
}
}
}
When i run the application shows error as follows
Keyword not supported: 'Mymachine\sqlserver2012; integrated security'
please help me.
what is the mistake in my above code