Solved

keep running total and change to currency

Posted on 2009-05-07
5
354 Views
Last Modified: 2013-12-17
Can you  help me figure out how to keep an accurate running total when using the wizard control, and convert these results to a currency value? (because I'm going to have send this value as payment to paypal, so I need currency instead of string--and, of course, accurate) Thanks.
Protected Sub Wizard1_ActiveStepChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Wizard1.ActiveStepChanged

        Select Case Wizard1.ActiveStepIndex

            Case 0

                'How many users                

            Case 1

                lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue

            Case 2

                lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue * rdoHours.SelectedValue

            Case 3

                lblReport.ForeColor = Drawing.Color.Red

                lblReport.Text = "This is a summary of your selections for a webcast service commencing on " & _

                RadDateTimePicker1.SelectedDate & ", for " & rdoHours.SelectedItem.Text & " hours, to support up to " & _

                rdoConcurrentUsers.SelectedItem.Text & " total users." & " If this is correct, click Finish to checkout."

        End Select

    End Sub
 

    Protected Sub rdoConcurrentUsers_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

        lblTxtTotal.Visible = True

        lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue

    End Sub
 

    Protected Sub rdoHours_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)

        lblTally.Text = 23 + rdoConcurrentUsers.SelectedValue * rdoHours.SelectedValue

    End Sub

Open in new window

0
Comment
Question by:John Account
  • 3
  • 2
5 Comments
 
LVL 13

Accepted Solution

by:
copyPasteGhost earned 500 total points
Comment Utility
Don't use a string use decimal.
0
 

Author Comment

by:John Account
Comment Utility
Thank you, Ghost. That did the trick!
0
 

Author Closing Comment

by:John Account
Comment Utility
Very nice. Thanks.
0
 
LVL 13

Expert Comment

by:copyPasteGhost
Comment Utility
you are most welcome. If you have anything else don't be shy.
0
 

Author Comment

by:John Account
Comment Utility
I'll try not to be! Thanks :-)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now