?
Solved

asp.NET question

Posted on 2013-10-29
2
Medium Priority
?
237 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 1500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

752 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