converting varcharfield in HTML

robotman321

New Member
I have a problem correctly displaying text that has been retrieved from a database(SQLServer 2000)<BR><BR>When I save for example the following text into the database (fielddatatype varchar(1000))<BR><BR>"This is just some text.<BR> This is a new line"<BR><BR>and then retrieve it from the database and write it to my HTMLpage then the text is showed as one line <BR><BR><BR>"This is just some text. This is a new line"<BR><BR>How can I save or retrieve the right displayformat.<BR><BR>thanx in advancenewlines and whitespace are ignored by html. If you want to preserve your newlines your going to need to replace the newlines with '<BR>'. You could either use the string.replace function or you can do it in your sql query.oops... this messageboard rendered my br tag.<BR><BR>you need to replace your newlines with a BR
 
Back
Top