Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

asp syntax

Posted on 2016-11-07
3
Medium Priority
?
79 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 53

Accepted Solution

by:
Ryan Chong earned 1000 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 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
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/…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

704 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