?
Solved

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

Posted on 2007-11-28
6
Medium Priority
?
311 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 500 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

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

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 would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

649 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