private void ShowLCOrderGridByStyle() { string ocode = ((SessionUser)Session["SessionUser"]).OCode; int StyleId = Convert.ToInt32(ddlS_Style.SelectedValue); var result = masterBLL.GetLCOrderGridByStyle(ocode, StyleId); if (result.Count > 0) { grdorder.DataSource = result.ToList(); grdorder.DataBind(); } else { ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('No Data Found With This Style')", true); } }