It seems like you don't wanna put any effort yourself so here is the all your method corrected:
protected void Button1_Click(object sender, EventArgs e)
{
string strcon = @"Data Source=RAJA;Initial Catalog=frame;Integrated Security=SSPI;";
SqlCommand cmdinserted = new SqlCommand();
SqlConnection con = new SqlConnection(strcon);
cmdinserted.CommandText = "select * from jms";
cmdinserted.CommandTimeout = 0;
cmdinserted.CommandType = CommandType.Text;
cmdinserted.Connection = con;
try
{
SqlDataAdapter adapter = new SqlDataAdapter();
adapter.SelectCommand = cmdinserted;
con.Open();
cmdinserted.ExecuteReader();
con.Close();
DataTable table = new Datatable();
adapter.Fill(table);
gridView1.DataSource = table;
gridView1.DataBind();
}
catch (Exception ex)
{
Label1.Text = ex.Message.ToString();
}