textbox text as html for an email in c#
c#, email
Solution
Try this:
var textBoxText = tbDeliver.Text.Replace(Environment.NewLine, "<br>");
Problem
I am trying to send an smtp email from my c# web site. it sends fine all except when a textbox text has line breaks in it it does not format these in the email.. instead it just has one long string of text. the email is html encoded so how do i make this: tbDeliver.Text keep the line breaks in the email? Thanks in advance