public partial class Returnedstock : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { if (Session["AvailableStock"] != null || Session["Expiredstock"] != null) { BindGrid(); } } } void BindGrid() { if (Session["AvailableStock"] != null) { DataTable dtselectedRows = Session["AvailableStock"] as DataTable; GridView1.DataSource = dtselectedRows; GridView1.DataBind(); } else if (Session["Expiredstock"] != null) { DataTable dtselectedRows = Session["Expiredstock"] as DataTable; GridView1.DataSource = dtselectedRows; GridView1.DataBind(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)