Solved

asp syntax

Posted on 2016-11-07
3
76 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
[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
3 Comments
 
LVL 52

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

Independent Software Vendors: 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 was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

627 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