Solved

asp syntax

Posted on 2016-11-07
3
56 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 50

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 information …
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…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

839 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