i have a gridview with project names with autogenerated select button when select button is selected bellow code is executed
- protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
- {
- lblProjectno.Text = GridView1.SelectedRow.Cells[1].Text;
- String s1 = lblProjectno.Text;
- SqlConnection con = new SqlConnection(ppd_Vas);
- con.Open();
- SqlCommand cmd = new SqlCommand("query'", con);
- cmd.Parameters.AddWithValue("@ProjectNo", s1);
- SqlDataAdapter da = new SqlDataAdapter(cmd);
- DataSet ds = new DataSet();
- da.Fill(ds);
- GridView2.DataSource = ds;
- GridView2.DataBind();
- con.Close();
- GridView5_Show();
- DisplayProject();
- Panelprojectdashboard1.Visible = true;
- Bindchart1();
- BindChart2();
- }
in above code i have mentioned a function call Gridview5_show()
code of Gridview5_show() is bellow
- protected void GridView5_Show()
- {
- string s1 = GridView1.SelectedRow.Cells[1].Text;
- SqlConnection con = new SqlConnection(ppd_Vas);
- con.Open();
- SqlCommand cmd = new SqlCommand("query ", con);
- cmd.Parameters.AddWithValue("@ProjectNo", s1);
- SqlDataAdapter da = new SqlDataAdapter(cmd);
- DataSet ds = new DataSet();
- da.Fill(ds);
- GridView5.DataSource = ds;
- GridView5.DataBind();
- con.Close();
- }
but when im selecting the select button it is showing error at line 17 da.Fill(ds);
error is : Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.


Amit KumarRank #459 · 5.4K reputationPosted Apr 30, 2019, 2:06 AM EDT
Anoop Kumar SharmaRank #127 · 17.4K reputationPosted Apr 30, 2019, 9:01 AM EDT
Amit KumarRank #459 · 5.4K reputationPosted Apr 30, 2019, 9:10 AM EDT
Mohsin ArifRank #732 · 3.2K reputationPosted Apr 30, 2019, 9:35 AM EDT
Amit KumarRank #459 · 5.4K reputationPosted Apr 30, 2019, 8:22 PM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Apr 30, 2019, 2:23 AM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Apr 30, 2019, 7:51 PM EDT
Subin ThomasRank #724 · 3.2K reputationPosted Apr 30, 2019, 8:11 PM EDT
Manoj BhoirRank #599 · 4K reputationPosted Apr 30, 2019, 9:03 PM EDT