473,386 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Need a new line in my label tag

Hi,

I am getting a label to display data on page load after retreiving
from the SQL server. But I need to display many values, so I am
concatenating a string value and then using a label to display it.

totalMessage = (string)dreader1.GetValue(2);
totM += totalMessage + "\n";
Label8.Visible = true;
Label8.Text =totM;

But I am not getting the values on seperate lines. What may I have to
do for that?

Any help will be appreciated. Thanks alot!

Apr 23 '07 #1
2 6767
"moni" <mo*******@gmail.comwrote in message
news:11*********************@e65g2000hsc.googlegro ups.com...
I am getting a label to display data on page load after retreiving
from the SQL server. But I need to display many values, so I am
concatenating a string value and then using a label to display it.

totalMessage = (string)dreader1.GetValue(2);
totM += totalMessage + "\n";
Label8.Visible = true;
Label8.Text =totM;

But I am not getting the values on seperate lines. What may I have to
do for that?

Any help will be appreciated. Thanks alot!
Change "\n" to "<br />"
Apr 23 '07 #2
You're using a \n, which is the escape character for a string. That's fine
for the string, but that means absolutely nothing to the browser. The the
web browser that's just whitespace. You'll need to concatenate an HTML
linebreak instead of a string linebreak. Try "<br />" instead.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"moni" <mo*******@gmail.comwrote in message
news:11*********************@e65g2000hsc.googlegro ups.com...
Hi,

I am getting a label to display data on page load after retreiving
from the SQL server. But I need to display many values, so I am
concatenating a string value and then using a label to display it.

totalMessage = (string)dreader1.GetValue(2);
totM += totalMessage + "\n";
Label8.Visible = true;
Label8.Text =totM;

But I am not getting the values on seperate lines. What may I have to
do for that?

Any help will be appreciated. Thanks alot!

Apr 23 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Phil Powell | last post by:
The following code: $kounter = 0; $fsArray = array('farge', 'storrelse'); for ($i = 0; $i < sizeof($fsArray); $i++) { // POPULATE CONTENT FOR BOTH FARGE AND STØRRELSE DROPDOWNS NOW ASSOCIATED...
10
by: Steve | last post by:
I'm not sure if I should be using tables here to structure the layout or if CSS is okay. I have a data entry form in which I have floated the labels to one side, and given them a specific width....
2
by: Mike Button | last post by:
Hello all, I am really really desperate on what I should do, and I am asking for help from anyone in this newsgroup, here's the situation: I am creating a form that is being run on a server...
1
by: John | last post by:
I'm trying to use the DrawText() method to draw some very long string text on the Panel with AutoScroll enabled. However, for some unknown reasons, I could not trigger the ScrollBar to show up. ...
5
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function...
7
by: Sandy | last post by:
Hello - I have a form that when submitted checks the database and if the username is already taken, a label shows indicating same. I need to make that label NOT visible after the user clicks...
16
by: Basil Fawlty | last post by:
Hi everyone, I have an assignment, to create a simple VB program that computes the volume of a cylinder. The Form is pretty simple, it has a label and text box for base radius, another for height...
1
by: ngreplies | last post by:
I am using a label as a tooltip box because I need to be able to change the background of the box depending on the information it is representing. That aside, I need to be able to auto-size the...
8
by: punitshrivastava | last post by:
Hi to All. I am Punit .I am back with new question .Please help me. I want to create one enquiry form in php.for this I code it: form code: <form name="enquiry" method="post" ...
70
mideastgirl
by: mideastgirl | last post by:
I have recently been working on a website for an honors association, and have a lot of difficulty but have found help from those on this site. I would like to see if I can get some more help on a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.