SQL PHP HTML ASP JavaScript articles and free scripts to download
 

Line break in ASP

There is no single function to convert text line break to html line break in ASP. This has many requirements particularly when you are sending html email or posting the textbox entered data to the screen. The line breaks inside the textarea won't reflect as it is when we show the output through the browser. Reason is text line breaks we have to change to html line breaks.

Demo of Text area line breaks.

To get this we will use ASP string replace function like this .

Replace( text_variable,vbcrlf,”<BR>”)

Vbcrlf is the line break in text format , this will be replace by <BR> line break tag in html. Equivalent line break command in PHP is nl2br


Further readings
ASP functions to handle string
Adding two or more strings in ASP
Getting the size or length of the string by using len() function
Removing blank space before and after a string using trim function
Changing lower to upper or upper to lower case of text present inside a string
Reversing a string variable by using StrReverse function
Compare two strings in different ways by using StrComp function
Collecting parts from Left , right and middle areas of a string
Checking matching of a string inside another string using InStr function
Searching and replacing strings inside another string using Replace function
Creating arrays by splitting string using split() function
Joining elements of an array to create a string variable
Line Break by replacing text line break to html line break using Replace function
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
String Functions