Hi all ,
I want to clear the carlist , which I loaded from the order page. Those values to be generated from temporary datatable. I have confirmed it in Cofirm.aspx Page, I have created Session for that tempory table.
After saving the Cartlist. I have clear that Session.
I share my code ..Anybody know it ., Suggest me to do so .
- protected void Page_Load(object sender, EventArgs e)
- {
- DishCart_DataTable = new DataTable();
- DishCart_DataTable.Columns.Add("DishId");
- DishCart_DataTable.Columns.Add("ImagePath");
- DishCart_DataTable.Columns.Add("DishName");
- DishCart_DataTable.Columns.Add("Price");
- DishCart_DataTable.Columns.Add("Count");
- DishCart_DataTable.Columns.Add("Total");
- DishCart_DataTable = (DataTable)Session["DishCart"];
- grdCart.DataSource = DishCart_DataTable;
- grdCart.DataBind();
- if (!IsPostBack)
- {
- LoadNum();
- }
This how I load the Grid ., Now i need it to be clear after saving it to database. How can I null session of datatable values.