Calculation in code behind

前端 未结 5 1183
悲哀的现实
悲哀的现实 2021-01-28 04:50

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.



        
5条回答
  •  执笔经年
    2021-01-28 05:23

    When you provide to select the service in a dropdown, why not store that status in session as well ? Like

    bool chauffeurService= YourServiceDropDown.SelectedValue=="1" ? true :false;
    Session["chauffeurStatus"]=chauffeurService;
    

    Then inside your form where to process values

    // Check if Chauffer service status is 1 add 30 dollars else don't add anything
    

提交回复
热议问题