Lecture 16 - ASP - NET (Part 3)
Lecture 16 - ASP - NET (Part 3)
Lecture 16 - ASP - NET (Part 3)
6 Framework
}
Designing the GUI
Save the session data
protected void btnSubmit_Click(object sender, EventArgs e)
{
// Set current user prefs.
var cart = (UserShoppingCart)Session["UserShoppingCartInfo"];
cart.DateOfPickUp = myCalendar.SelectedDate;
cart.DesiredCar = txtCarMake.Text;
cart.DesiredCarColor = txtCarColor.Text;
cart.DownPayment = float.Parse(txtDownPayment.Text);
cart.IsLeasing = chkIsLeasing.Checked;
lblUserInfo.Text = cart.ToString();
Session["UserShoppingCartInfo"] = cart;
}
Access it in the checkout page
References
Troelsen, A. & Japikse, P., 2015. C# 6 and the
.NET 4.6 Framework. 7th ed. Apress.