A1VBCode Forums

Display Numeric Textbox Formated Percent


http://www.a1vbcode.com/vbforums/Topic32371.aspx

By wkalo - 2/10/2016

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
By Mark - 2/11/2016

Give this a try instead.



CDbl(TextBox.Text).ToString("P")