Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Display Numeric Textbox Formated Percent


Display Numeric Textbox Formated Percent

Author
Message
wkalo
wkalo
Forum Member
Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)Forum Member (37 reputation)

Group: Forum Members
Posts: 1, Visits: 7
Good Day

I Am Using VB.Net And I Have Fields That I Need To Be Displayed In Percent (e.g. 10%)

All What I Have Seen On The Net Is

TextBox.Text = CDbl(TextBox.Text).ToString("0%")

This Only Works On Input

But If I Want To Browse The Data Through My Form The Textbox Displays the 10% As 0.1



Any Suggestion Would Much Appreciated


wkalo
Mark
Mark
Forum God
Forum God (4.9K reputation)

Group: Moderators
Posts: 1.1K, Visits: 11K
Give this a try instead.



CDbl(TextBox.Text).ToString("P")
Edited
2/11/2016 by Mark
GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search