Click here to Skip to main content
14,172,376 members
Rate this:
 
Please Sign up or sign in to vote.
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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

   

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web05 | 2.8.190524.3 | Last Updated 12 Feb 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100