I'm trying to take a result for a simple website conversion calculator and turn that into a percentage. So for example, if the result is 0.314500 I want to turn that into 31.4%.
Here is the code I have so far for this:
Visual Basic 2008 Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim d As Decimal d = (TextBox2.Text.ToString / TextBox1.Text.ToString) Me.TextBox3.Text = Decimal.Round(d, 4).ToString("f6") End Sub




Reply With Quote