Replace carrage return with break tag



Replace carrage return with break tag To replace carrage returns with the break tag (<br/>) is very useful if you like to store your text cleanly in a database (i.e. MS SQL 2000).

The process of this is faily simple, you simply say it out in the below format:
Replace(SOURCE, Chr(13) + Chr(10), "<br />")
Working examples of the format in work are:

Example 1:
Replace(objDR("text"), Chr(13) + Chr(10), "<br />")
Example 2:
<%# Replace(DataBinder.Eval(Container.DataItem, "text"), Chr(13) + Chr(10), "<br />") %>
Now you can use this method to replace and character/s with a string of your choice. You could even use it to remove a certain character or string.


Send a link to this page via email Send a link to this page via email