Form Output - ASP.Net

Associate
Joined
9 Dec 2008
Posts
2,341
Location
Somewhere!
Hi All,

I have a site with multiple drop down lists... and when I press submit what it to create a list of differente things such as:

1
2
3
....

but at the moment, I have it going 1 2 3 ...

I have 2 different Result labels side by side in a table. If I shrink the table down I can get it to list them, but then if one thing is named slightly longer, or slightly shorter, it goes onto the wrong line, certain things bunch up together, where as some longer items are split up.

Example of the source Code I have...

If Test.Text = "Test1" Then
Test_Result.Text = "1. Test 2. Test 3. Test"
End If

Any advice appreciated!
 
Can you use VbCrLf in asp.net?

Code:
If Test.Text = "Test1" Then
  Test_Result.Text = "1" & vbcrlf  & "Test 2." & vbcrlf  & "Test 3." & vbcrlf  & "Test"
End If

or chr(13) ?
 
Last edited:
Got this working just by put <ul></ul> around it, then seperating it all out with <li> tags... looks ok, so I'm happy... probably not the best way to do it though lol.
 
Back
Top Bottom