Solved

In Classic ASP, How do I display <br> ?

Posted on 2007-11-28
6
309 Views
Last Modified: 2010-04-21
Hello.
In Classic ASP coding, I used this coding below to display <br>
Description = replace(rs("Description"),chr(13) & chr(10),"<br>")

But here is the problem.
In this page there are many rs("Descriptoin") and since I replace the rs("Description") into Description, it's displaying same description in the page.

What do I have to do?
0
Comment
Question by:erin027
[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
6 Comments
 
LVL 23

Expert Comment

by:Ashish Patel
ID: 20364019
Use this and let me know
Description = Replace(Replace(Replace(rs("Description"), vbCrLf,"<br>"), vbCr, "<br>"), vbLf, "<br>")
0
 
LVL 11

Expert Comment

by:Sven
ID: 20364077
If there is displaying the same description over an over again, are you sure you are calling rs.MoveNext ? Or am I totaly missunderstanding your question?
0
 

Author Comment

by:erin027
ID: 20364079
Thank you asvforce.
But the problem didn't solve.
<br> works, but my problem was because of the replacement, recordset is showing same results.
Here is my coding.
Thank you.

<% if rs.BOF or rs.EOF then %>
<%else
Description = Replace(Replace(Replace(rs("Description"), vbCrLf,"<br>"), vbCr, "<br>"), vbLf, "<br>")
i=1
Do until rs.EOF
%>

<%=rs("title")%>
<%=description%>

<%
rs.MoveNext
i=i+1
loop
End if
%>
0
Technology Partners: 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!

 
LVL 23

Accepted Solution

by:
Ashish Patel earned 125 total points
ID: 20364092
Do this
<% if rs.BOF or rs.EOF then %>
<%else
i=1
Do until rs.EOF
Description = Replace(Replace(Replace(rs("Description"), vbCrLf,"<br>"), vbCr, "<br>"), vbLf, "<br>")

%>

<%=rs("title")%>
<%=description%>

<%
rs.MoveNext
i=i+1
loop
End if
%>
0
 

Author Closing Comment

by:erin027
ID: 31411374
Thank you!
0
 
LVL 11

Expert Comment

by:Rajesh Dalmia
ID: 20364124
instead of storing value in variable and then print better u do this

instead of

<%Description = Replace(Replace(Replace(rs("Description"), vbCrLf,"<br>"), vbCr, "<br>"), vbLf, "<br>") %>
<%=description%>

do redirectly

<%=Replace(Replace(Replace(rs("Description"), vbCrLf,"<br>"), vbCr, "<br>"), vbLf, "<br>") %>

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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 we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

726 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