Solved

asp.NET question

Posted on 2013-10-29
2
235 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

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…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

691 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