i have table from database this table has 400000 row in my asp page my dropdown list(ddlPlaintiffName) fill from this method
private void FillPlaintiff() { //declare connection by pass connection string from web.config SqlConnection sqlcon = new SqlConnection (ConfigurationManager.ConnectionStrings["SystemConn"].ConnectionString); //declare sql statment as astring variable SqlCommand sqlcom = new SqlCommand(); sqlcom.Connection = sqlcon; sqlcom.CommandType = CommandType.StoredProcedure; sqlcom.CommandText = "proc_SelectPlaintiff"; DataTable ds = new DataTable(); //fill data set with data adabter that contain data from database // sad.Fill(ds); sqlcon.Open(); SqlDataAdapter sad = new SqlDataAdapter(sqlcom); sad.Fill(ds); ddlPlaintiffName.DataSource = ds; ddlPlaintiffName.DataBind(); ddlPlaintiffName.Items.Insert(0, "--select --"); sqlcon.Close(); }
but every postback my load is very very slow how can i avoid this