private void GetDist() { try { distObj = new Districts(ComObj); DataSet ds = distObj.selectmp(dist); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { DDL_Dist.DataSource = ds.Tables[0]; DDL_Dist.DataTextField = "DistrictName"; DDL_Dist.DataValueField = "DistrictCode"; DDL_Dist.DataBind(); DDL_Dist.Enabled = false; } } } catch (Exception ex) { Page.RegisterClientScriptBlock("mymsg2", "<script language=javascript> alert('" + ex.Message + "'); </script> "); } }
private void GetDist() { distObj = new Districts(ComObj); DataSet ds = distObj.selectmp(dist); if (ds != null) { if (ds.Tables[0].Rows.Count > 0) { DDL_Dist.DataSource = ds.Tables[0]; DDL_Dist.DataTextField = "DistrictName"; DDL_Dist.DataValueField = "DistrictCode"; DDL_Dist.DataBind(); DDL_Dist.Enabled = false; } } }