Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hii..i have CheckboxList in which i have 5 checkbox-Select All,Karate,Kickboxing,Kung Fu,Yoga. I want when user checked first option "Select All" then all checkboxses selected automatically and show in label message 15000.And if user checked one by one i.e checked Karate then message shows 5000...and so on.Or user chcked if like Karate and Yoga message shows the total sume of Fees like Karate fees is 5000 and yoga fees is 3000 then it should be show 8000.
Please help me ...Thnk u

What I have tried:

protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
   {
       if (CheckBoxList1.SelectedItem.ToString() == "Select All")
       {
           Lblselected.Text = "15000";

       }
       else if (CheckBoxList1.SelectedItem.ToString() == "Karate")
       {
           Lblselected.Text = "4000";

       }
       else if (CheckBoxList1.SelectedItem.ToString() == "Kickboxing")
       {
           Lblselected.Text = "6000";

       }

       else if (CheckBoxList1.SelectedItem.ToString() == "Kung Fu")
       {
           Lblselected.Text = "3500";

       }
       else if (CheckBoxList1.SelectedItem.ToString() == "Yoga")
       {
           Lblselected.Text = "1500";

       }

       else
       {
           Lblselected.Text = "0";

       }
   }
Posted
Updated 11-Feb-19 22:03pm

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900