Forum Moderators: phranque
<asp:TextBox id="txtComments" runat="server" columns="35" rows="8" textmode="MultiLine"></asp:TextBox>
Now, everything works fine and it gets emailed. However, the message in the text area gets rid of the newline characters and presents everything in one line, even when I use multiple lines to type in the message.
Why is this happening? How can I make sure that the message can keep the newline characters?
Thanks
If your mailObj.BodyFormat = MailFormat.Html
Then it should work like this:
mailObj.Body = replace(txtComments.text, System.Environment.NewLine, "<br>")
OR
If your mailObj.BodyFormat = MailFormat.Text
try this:
mailObj.Body = replace(EmailBody.text, System.Environment.NewLine, "\n")
Hope that helps clarify my previous post better.