how to calculate total amount for multiple checkboxes in .net using C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kaavitha
    New Member
    • Oct 2008
    • 6

    how to calculate total amount for multiple checkboxes in .net using C#

    I am using checkbox list in my project,
    [x]item1 250
    [ ] item2 200
    [x]item3 300
    [ ] item4 250
    [x]item5 300

    so after checking ,the selected items should be redirected to another page with their cost and the total amount should be calculated over their. i am giving the cost in text box. i want this coding in .net framework using c#..

    it should display,

    item1 250
    item3 300
    item5 300
    -------- ------
    total 850

    Is there any one to help me...its very urgent...THANKS IN ADVANCE....
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Uhh, Math101. You're asking us how to add numbers together. That is not only beginner coding, but beginner math.
    Please go ahead and attempt the problem on your own. We won't do your work for you.
    If you have any specific troubles, come back and reply to the post.

    MODERATOR

    Comment

    • kaavitha
      New Member
      • Oct 2008
      • 6

      #3
      Originally posted by Plater
      Uhh, Math101. You're asking us how to add numbers together. That is not only beginner coding, but beginner math.
      Please go ahead and attempt the problem on your own. We won't do your work for you.
      If you have any specific troubles, come back and reply to the post.

      MODERATOR
      Sorry sir, I know its a basic calculation...b ut i want the calculation should be performed in the redirected page..experts should help the beginners..

      Comment

      • Curtis Rutland
        Recognized Expert Specialist
        • Apr 2008
        • 3264

        #4
        Experts should help beginners, yes, but we will not hand out code to you.

        Here's how to get started. When you click the button or whatever to do the work, loop through your checkboxlist. If the item is checked, add it to a list or an array. After the loop, assign the array to a value in the Session object. On the redirected page, retrieve that Session object, loop through the array, and display and add your numbers.

        Comment

        • kaavitha
          New Member
          • Oct 2008
          • 6

          #5
          Originally posted by insertAlias
          Experts should help beginners, yes, but we will not hand out code to you.

          Here's how to get started. When you click the button or whatever to do the work, loop through your checkboxlist. If the item is checked, add it to a list or an array. After the loop, assign the array to a value in the Session object. On the redirected page, retrieve that Session object, loop through the array, and display and add your numbers.

          Thank You...now i understood what i want to do..now i'll work in it..once again thank you for your immediete response..THANK YOU bytes...

          Comment

          Working...