jag använder följande kod:Replace behöver hjälp!
<% Function kod(presentation)
presentation = Server.HTMLEncode(presentation)
presentation = Replace(presentation,"[b]","<b>")
presentation = Replace(presentation,"[/b]","</b>")
presentation = Replace(presentation,"[i]","<i>")
presentation = Replace(presentation,"[/i]","</i>")
presentation = Replace(presentation,"[u]","<u>")
presentation = Replace(presentation,"[/u]","</u>")
presentation = Replace(presentation,"[f]","<font color=""#0066CC"">")
presentation = Replace(presentation,"[/f]","</font>")
presentation = Replace(presentation,"[B]","<b>")
presentation = Replace(presentation,"[/B]","</b>")
presentation = Replace(presentation,"[I]","<i>")
presentation = Replace(presentation,"[/I]","</i>")
presentation = Replace(presentation,"[U]","<u>")
presentation = Replace(presentation,"[/U]","</u>")
presentation = Replace(presentation,"[F]","<font color=""#0066CC"">")
presentation = Replace(presentation,"[/F]","</font>")
presentation = TRIM(presentation)
presentation = Replace(presentation,". ",".<br>")
kod = presentation
End Function %>
Nu vill ja lägga upp <%= Recset("presentation") %> men vill använda ovanstående replace och vill även ha <br> så att inte texten tex blir:
Jag heter Hassan. Jag är 18 år. Jag bor i Malmö.
Utan:
Jag heter Hassan.
Jag är 18 år.
Jag bor i Malmö.
Någon som kan hjälpa mig med det ?
Tacksam för svar!
Hassan
PS: Jag har testat med <%= kod(RecSet("presentation")) %> o det funkar men <br> funkar ej!