Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Add A ' %' sign to decimal value

Posted on 2014-03-27
4
Medium Priority
?
215 Views
Last Modified: 2014-11-27
Hi

I'm displaying a decimal value in a label.

I just want to add a % behind the label. I've tried
 + "%"  

Open in new window

but does not work

Code

   
Dim FinalFinalAPR As Decimal = Math.Round(FinalAPR, 1)


        lbAPR.Text = FinalFinalAPR 

Open in new window

 I just want to to display a % behind the lbAPR.text

thanks
0
Comment
Question by:Ed
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Assisted Solution

by:Pasha Kravtsov
Pasha Kravtsov earned 668 total points
ID: 39960404
Dim FinalFinalAPR As Decimal = Math.Round(FinalAPR, 1)
        lbAPR.Text = lbAPR.TEXT.insert(1, "%")

Open in new window

0
 
LVL 52

Assisted Solution

by:Carl Tawn
Carl Tawn earned 664 total points
ID: 39960437
You probably need to cast the decimal first. Try:
Dim FinalFinalAPR As Decimal = Math.Round(FinalAPR, 1)
lbAPR.Text = FinalFinalAPR.ToString() & "%"

Open in new window

0
 
LVL 26

Accepted Solution

by:
Alan Warren earned 668 total points
ID: 39960439
Hi edjones1,
Whatever value you are adding the percent character to should be converted to string before concatenating the '%' char.
lbAPR.Text = FinalFinalAPR.ToString & "%"

Open in new window

Respectfully yours,
Alan
0
 

Author Closing Comment

by:Ed
ID: 40468813
Brilliant, Thanks
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

688 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