Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Asp.Net - Changing number format to display just a value, regardless of negative or positive.

Avatar of theclassic
theclassicFlag for United States of America asked on
Visual Basic ClassicASP.NETVisual Basic.NET
10 Comments1 Solution592 ViewsLast Modified:
This is a two part question, so I will post the first one...

I have an output where the number is formatted in a currency, and when the value is negative, parenthesis are placed around the asp label that displays the value of the text.  Here is the label tag :

<asp:label id="lblIncreaseInAmountContributingTo401k" runat="server"/>
And here is the code where it is called, computed, and formated, I have broken up the code and listed it in order, as I am not sure how far back it is needed to go to aquire the desired result, but this should be enough :


lblIncreaseInAmountContributingTo401k.text = FormatCurrency(Cdbl(hiddenIncreaseInAmountContributingTo401k.text))


<asp:label id="hiddenIncreaseInAmountContributingTo401k" runat="server"/>


hiddenIncreaseInAmountContributingTo401k.text = Cdbl(hiddenFutureContributionAmount.text) - Cdbl(hiddenCurrentContributionAmount.text)

I am a beginner trying to learn, so thank you for your patience as I learn how to post in the most effective way
Avatar of burakiewicz
burakiewiczFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 10 Comments.
See Answers