How can i create salary format in Textbox ? for example i want create 2000.00 .
-
hi all i have one problem ,when entered salary amount in textbox its only display 2000rs , here i want 2000.00 format . Pls give me code how can i write that format (2000.00)
-
hi all i have one problem ,when entered salary amount in textbox its only display 2000rs , here i want 2000.00 format . Pls give me code how can i write that format (2000.00)
Go Through this link http://www.java2s.com/Code/VB/Development/StringFormatCurrency.htm[^]
Rajesh B --> A Poor Workman Blames His Tools <--
-
hi all i have one problem ,when entered salary amount in textbox its only display 2000rs , here i want 2000.00 format . Pls give me code how can i write that format (2000.00)
Dim mySalary As Double = 2000
txtSalary.Text = mySalary.ToString("$0.00")
...
or
Public Sub txtSalary_Validate(...)...
If IsNumeric(txtSalary.Text) = True Then
txtSalary.Text = CDbl(txtSalary.Text).ToString("$0.00")
End If
End SubI don't speak Idiot - please talk slowly and clearly I don't know what all the fuss is about with America getting it's first black president. Zimbabwe's had one for years and he's sh*t. - Percy Drake , Shrewsbury Driven to the arms of Heineken by the wife
-
hi all i have one problem ,when entered salary amount in textbox its only display 2000rs , here i want 2000.00 format . Pls give me code how can i write that format (2000.00)
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
TextBox1.Text = CDbl(TextBox1.Text).ToString("F")
End Subbut make sure that only numeric values are entered.
My advice is free, and you may get what you paid for.