Solved

asp syntax

Posted on 2016-11-07
3
66 Views
Last Modified: 2016-11-07
I am connecting to a recordset and want to display the results as a list.
This gets the data:
            if Rst2.eof = false	then
                Do While NOT Rst2.EOF 
                iMsg2 = iMsg2 & rst2.fields("Serial") & " // " & rst2.fields("Updated") & vbCrLf & vbCrLf
                Rst2.MoveNext
                Loop
            end if

Open in new window


This displays the data:
<tr><td colspan="3"><%=iMsg2%></td>

Unfortunately it displays like this: Record1, Record2, Record3

I want it to display as a list e.g.
Record1
Record2
Record3

The vbCrLf does not seem to work, can anyone help?
0
Comment
Question by:HKFuey
3 Comments
 
LVL 51

Accepted Solution

by:
Ryan Chong earned 250 total points
ID: 41876734
in HTML , you need to use <br> to represent a carriage return.

hence, try this instead:

            if Rst2.eof = false	then
                Do While NOT Rst2.EOF 
                iMsg2 = iMsg2 & rst2.fields("Serial") & " // " & rst2.fields("Updated") & "<br>"
                Rst2.MoveNext
                Loop
            end if

Open in new window

0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 41876737
'vbCrLf' does not work in a web page.  You need to put '<br>' after each item.  Try this.
            if Rst2.eof = false	then
                Do While NOT Rst2.EOF 
                iMsg2 = iMsg2 & rst2.fields("Serial") & " // " & rst2.fields("Updated") & "<br>"
                Rst2.MoveNext
                Loop
            end if

Open in new window

0
 

Author Closing Comment

by:HKFuey
ID: 41876757
Thanks guys, super quick response!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

763 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