473,383 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Display a Multiline Textbox in an email correctly?

The abjective is to allow the user to enter multiple lines of a material
list into an ASP form that will be emailed the the supplier. The user side
works fine, but the resulting email loses its EOL format in the email. Here
is a portion of the code where I think the problem is but I can not find any
documentation on how to solve this obviously simple task.

twTextWriter.RenderBeginTag("tr")
twTextWriter.RenderBeginTag("td width=""150""")
twTextWriter.WriteLine("Material List: ")
twTextWriter.RenderEndTag
twTextWriter.RenderBeginTag("td")
twTextWriter.Write(tbMaterialList.value)
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag

twTextWriter.RenderEndTag
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag

objMailMessage = New MailMessage
objMailMessage.From = "No*****@Address.com"
objMailMessage.To = Order@****.com
objMailMessage.Subject = "Order From Website"
objMailMessage.Body = swHtmlBody.ToString
objMailMessage.BodyFormat = MailFormat.HTML
Thank you in advance for your help.
Mark P Sandfox
Nov 18 '05 #1
2 2573
Sorry, i had some old test code below - replace
twTextWriter.Write(tbMaterialList.value) with
twTextWriter.Write(tbMaterialList.text)
"Mark Sandfox" <Ma**@RestlessFox.com> wrote in message
news:7U***************@newssvr26.news.prodigy.com. ..
The abjective is to allow the user to enter multiple lines of a material
list into an ASP form that will be emailed the the supplier. The user side works fine, but the resulting email loses its EOL format in the email. Here is a portion of the code where I think the problem is but I can not find any documentation on how to solve this obviously simple task.

twTextWriter.RenderBeginTag("tr")
twTextWriter.RenderBeginTag("td width=""150""")
twTextWriter.WriteLine("Material List: ")
twTextWriter.RenderEndTag
twTextWriter.RenderBeginTag("td")
twTextWriter.Write(tbMaterialList.value)
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag

twTextWriter.RenderEndTag
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag

objMailMessage = New MailMessage
objMailMessage.From = "No*****@Address.com"
objMailMessage.To = Order@****.com
objMailMessage.Subject = "Order From Website"
objMailMessage.Body = swHtmlBody.ToString
objMailMessage.BodyFormat = MailFormat.HTML
Thank you in advance for your help.
Mark P Sandfox

Nov 18 '05 #2
Mark,

To conserve white space in the rendered HTML, try wrapping the text in a
<pre></pre> block.

HTH,
Nicole
"Mark Sandfox" <Ma**@RestlessFox.com> wrote in message
news:7U***************@newssvr26.news.prodigy.com. ..
The abjective is to allow the user to enter multiple lines of a material
list into an ASP form that will be emailed the the supplier. The user
side
works fine, but the resulting email loses its EOL format in the email.
Here
is a portion of the code where I think the problem is but I can not find
any
documentation on how to solve this obviously simple task.

twTextWriter.RenderBeginTag("tr")
twTextWriter.RenderBeginTag("td width=""150""")
twTextWriter.WriteLine("Material List: ")
twTextWriter.RenderEndTag
twTextWriter.RenderBeginTag("td")
twTextWriter.Write(tbMaterialList.value)
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag

twTextWriter.RenderEndTag
twTextWriter.RenderEndTag
twTextWriter.RenderEndTag

objMailMessage = New MailMessage
objMailMessage.From = "No*****@Address.com"
objMailMessage.To = Order@****.com
objMailMessage.Subject = "Order From Website"
objMailMessage.Body = swHtmlBody.ToString
objMailMessage.BodyFormat = MailFormat.HTML
Thank you in advance for your help.
Mark P Sandfox

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Michael C | last post by:
Hi all, I'm trying to add lines to a multiline textbox. Here's what I'd like to end up with in the textbox (as an example): Line1 Line2 Line3 I've tried a couple of methods but nothing...
6
by: dale zhang | last post by:
Hi, I build a web form with a 4-cell table on the top (flawlayout), followed by some labels and textboxes (gridlayout). The web form is displayed well in dell m60 laptop with all resolution...
7
by: Joel Finkel | last post by:
Folks, I have a form that has several TextBoxes, some of which have the TextMode set to MultiLine. Each is pre-loaded with data from a database. The user is allowed to modify each entry. The...
10
by: danthman | last post by:
I have a TextBox set up as follows: <asp:TextBox ID="SubjectTextBox" TextMode="MultiLine" MaxLength="100" Columns="50" Rows="2" Wrap="true" runat="server" />
1
by: Jeff | last post by:
hey asp.net 2.0 In my website I've got a textbox with TextMode=MultiLine. The user can enter text that contain "new line"... But to displays this I'm also using a textbox with...
0
by: CaJack | last post by:
Hi, I’m having trouble with my code and I’m starting to get lost. The Program takes the country that’s been typed in to the textbox and when the query button is clicked the program queries an access...
7
by: Anil Gupte | last post by:
I have read a lot about getting lines from a multiline textbox in VB.Net. However, I cannot for the life of me figure out how to write to a multiline textbox. Basically, I have created an array of...
12
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I want to plant an Easter Egg in our software. We have a TextBox that is multiline and used to display all sorts of messages on the screen for our operators based on database queries and such. ...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.