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.


Gautam ParmarRank #2,471 · 568 reputationPosted Dec 11, 2017, 7:46 PM EST
Karthik KRank #1,981 · 738 reputationPosted Dec 11, 2017, 7:55 PM EST
Gautam ParmarRank #2,471 · 568 reputationPosted Dec 11, 2017, 8:29 PM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 11, 2017, 11:34 PM EST
Karthik KRank #1,981 · 738 reputationPosted Dec 12, 2017, 2:11 AM EST
Laxmidhar SahooRank #383 · 6.6K reputationPosted Dec 12, 2017, 2:24 AM EST