Solved

# Add A ' %' sign to decimal value

Posted on 2014-03-27
206 Views
Hi

I'm displaying a decimal value in a label.

I just want to add a % behind the label. I've tried
`````` + "%"
``````
but does not work

Code

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

lbAPR.Text = FinalFinalAPR
``````
I just want to to display a % behind the lbAPR.text

thanks
0
Question by:edjones1

LVL 5

Assisted Solution

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

LVL 52

Assisted Solution

Carl Tawn earned 166 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() & "%"
``````
0

LVL 26

Accepted Solution

Alan Warren earned 167 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 & "%"
``````
Respectfully yours,
Alan
0

Author Closing Comment

ID: 40468813
Brilliant, Thanks
0

## Featured Post

Question has a verified solution.

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

### Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…