Textarea and Replace problems
Hi,
I am currently developing a forum and have tried converting certain values with the REPLACE method. See the following code:
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\\\\\\\\\\\\\\\\\Message = Server.HTMLEncode(strMess) 'converts to safe HTML code
Message = Replace (Message, "'", "''") 'converts ' to ''
Message = Replace (Message, " ", " ") 'converts spaces to html space code
Message = Replace (Message, vbNewLine, "<br>") 'converts ENTER to a <br> tag
/////////////////////////////////////////////////////////////////////
All works fine when I manually press the enter key at the end of a line but when I keep typing and allow for the auto-wrap to take place then the message is continued on the same line.
I would like to use the Len() method to insert a <br> at a certain length of chars but I do not know how to do this.
Can anyone help?
Thanks in advance.:(
devplus e-com
|