TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Karthik K
1k
743
193.5k
want to clear the cartlist in asp.net ?..
Dec 12 2017 12:39 AM
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.
Reply
Answers (
6
)
How to have the datas in the page even after redirection
find greates digit from 4 igit number