Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Feature Forums
  3. - Uncategorised posts -
  4. i have tried the code above . it works fine. but it only shows the breakdown of the costs. i want the label to show the total cost as well. what more should i add to the code?? please help</pre>

i have tried the code above . it works fine. but it only shows the breakdown of the costs. i want the label to show the total cost as well. what more should i add to the code?? please help</pre>

Scheduled Pinned Locked Moved - Uncategorised posts -
helpquestion
2 Posts 2 Posters 7 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Rikansha kumar
    wrote on last edited by
    #1

    Private Sub btnTotalCost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotalCost.Click

        lblTotalCost.Text = "YOU HAVE ORDERED:" & vbNewLine
    
        lblTotalCost.Text = lblTotalCost.Text & "ROOM TYPE" & vbNewLine & "--------" & vbNewLine
    
        If radLuxury.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Luxury = $210" & vbNewLine
        ElseIf radSuperior.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Superior = $150" & vbNewLine
        Else
            lblTotalCost.Text = lblTotalCost.Text & "Standard = $110" & vbNewLine
        End If
    
        lblTotalCost.Text = lblTotalCost.Text & vbNewLine & "MEAL OPTIONS" & vbNewLine & "--------" & vbNewLine
    
        If chkBufferBreakfast.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Buffer Breakfast = $40" & vbNewLine
        End If
        If chkBufferDinner.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Buffer Dinner = $60" & vbNewLine
        End If
    
        lblTotalCost.Text = lblTotalCost.Text & vbNewLine & "AMENITIES" & vbNewLine & "--------" & vbNewLine
    
        If chkInternet.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Internet = $10" & vbNewLine
        End If
        If chkEntertainment.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Entertainment = $20" & vbNewLine
        End If
        If chkSpaServices.Checked Then
            lblTotalCost.Text = lblTotalCost.Text & "Spa Services = $50" & vbNewLine
        End If
    
    
    
        
    End Sub
    
    Richard DeemingR 1 Reply Last reply
    0
    • R Rikansha kumar

      Private Sub btnTotalCost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotalCost.Click

          lblTotalCost.Text = "YOU HAVE ORDERED:" & vbNewLine
      
          lblTotalCost.Text = lblTotalCost.Text & "ROOM TYPE" & vbNewLine & "--------" & vbNewLine
      
          If radLuxury.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Luxury = $210" & vbNewLine
          ElseIf radSuperior.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Superior = $150" & vbNewLine
          Else
              lblTotalCost.Text = lblTotalCost.Text & "Standard = $110" & vbNewLine
          End If
      
          lblTotalCost.Text = lblTotalCost.Text & vbNewLine & "MEAL OPTIONS" & vbNewLine & "--------" & vbNewLine
      
          If chkBufferBreakfast.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Buffer Breakfast = $40" & vbNewLine
          End If
          If chkBufferDinner.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Buffer Dinner = $60" & vbNewLine
          End If
      
          lblTotalCost.Text = lblTotalCost.Text & vbNewLine & "AMENITIES" & vbNewLine & "--------" & vbNewLine
      
          If chkInternet.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Internet = $10" & vbNewLine
          End If
          If chkEntertainment.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Entertainment = $20" & vbNewLine
          End If
          If chkSpaServices.Checked Then
              lblTotalCost.Text = lblTotalCost.Text & "Spa Services = $50" & vbNewLine
          End If
      
      
      
          
      End Sub
      
      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      You have already posted this in QA: How do I show total cost in a label when user selects random radio buttons and checkboxes?[^]


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups