using System.Data;
namespace StateManagement
{
public partial class SessionExample2b : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
//
The Dataset was filled with records during Session_Start
event
//
in the Global.asax file.
DataSet myDS = (DataSet)Session["DS"]; ;
gvProducts.DataSource
= myDS;
gvProducts.DataBind();
}
}
protected void btnPreviousPage_Click(object sender, EventArgs e)
{
Response.Redirect("SessionExample2.aspx");
}
}
}