Solved

asp.NET question

Posted on 2013-10-29
2
233 Views
Last Modified: 2013-11-02
I am not very good at asp.net but am learning. I was asked to make a couple of changes on a client's site.

Here is the current code:
    <tr align="center">
        <td><asp:Label ID="_budgetMcfe" runat="server" ></asp:Label></td>
        <td><asp:Label ID="_actualMcfe" runat="server" ></asp:Label></td>
    </tr>    

This displays two numbers in each cell. I want to display 4 numbers, two in each cell separated by " / ". The 2nd number is simply the current value divided by 6.

So, I want _budgetMcfe / _budgetMcfe/6 in the first cell and _actualMcfe / _actualMcfe/6 in the 2nd cell that would look something like this:

   1800 / 300     2400 / 400

I would think this would be very easy but what I thought would be obvious did not work.
0
Comment
Question by:bbaldwin
[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
2 Comments
 
LVL 36

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 39610699
If you have enough UI room in your row cells, please modify code behind (C#) that assign text to your labels as follows:
//I assume these values you want to start with:
int budgetMcfeResults = 1800;
int actualMcfe Results = 2400;
_budgetMcfe.Text = String.Format("{0}/{1}", budgetMcfeResults , budgetMcfeResults / 6);
_actualMcfe.Text = String.Format("{0}/{1}", actualMcfe , actualMcfe / 6);

Open in new window

0
 
LVL 2

Author Closing Comment

by:bbaldwin
ID: 39619014
You gave me enough information to figure out what do to. Thanks!!
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
IDE for Python 5 68
how to check mis-spellings in a select SQL 2 38
T-SQL and CLR parameter strings 9 23
Validation for a field in asp.net 3 11
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…

749 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