ASP.net - one label, multiple values

I have a label, lblmessage, which I want to assign 4 different values.

It should show up like this:
5
4
3
2

I know this: lblmessage.text = "5" and to assign it another value lblmessage.text = lblmessage.text + "4".

This just puts them next to each other, but how can I get them to show up underneath each other?

Thanks!

Answers


Use:

lblmessage.Text += "<br />4";

Although I suggest that you use a StringBuilder.


You can do like..

lblmessage.Text = string.Format("{0}<br/>{1}<br/>{2}<br/>{3}<br/>", "5", "4", "3", "2");

Need Your Help

jQuery Drop Down Menu IE7 Problem with .slideDown

jquery css xhtml internet-explorer-7 drop-down-menu

I have the following jquery on mcgillidssa.com to animate the drop down menu:

.read .write .replace string elements in jQuery

javascript jquery parsing

I have these 2 functions (serialize and deserialize) in Javascript (below) and I want to change it to jQuery. I am wondering what would the right replacement for read and write in jQuery. Read and ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.