Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp.NET question

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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

610 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