Solved

asp syntax

Posted on 2016-11-07
3
23 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 49

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 82

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now