Chauffeur service cost $30. It is an option to user whether they want the service or not. When they already select car, and day of rental, I store it in session.
Session["car1"] = Label1.Text;
Session["price"] = Label5.Text;
Session["day"] = DropDownList3.SelectedItem.Text;
Session["driver"] = Label6.Text;
Response.Redirect("~/Welcome/BookingForm.aspx");
Then in bookingform.aspx, I retrieve back the session, and display it in label.
string car1 = Session["car1"].ToString();
string price = Session["price"].ToString();
string day = Session["day"].ToString();
string driver = Session["driver"].ToString();
To calculate the total amount of user should pay, I used this code:
int totalValue = 0;
totalValue = int.Parse(Session["price"].ToString()) *
int.Parse(Session["day"].ToString());
Label8.Text = totalValue.ToString();
The problem now is, I don't know how to add $30 for chauffeur service IF user pick that service. Like if user choose yes, totalValue + 30, and if NO, do nothing.
Thanks for your time. Cheers.