Home All Groups Group Topic Archive Search About
Author
30 Jun 2009 9:56 PM
Morris Neuman
Hi,

I want the EmailBody to have new line between fields.  Tried '\n' as well as
"\n" but neither work.

My string is as follows:
string EmailBody = "Name=" + TextBox1.Text + '\n' + "Phone=" + TextBox2.Text
+ " Email=" + TextBox4.Text + " Message=" + TextBox3.Text + " Remote Host=" +
RemoteHost;

--
Thanks
Morris

Author
30 Jun 2009 10:51 PM
Morris Neuman
Hi,

I was able to get a new line using <br></br>

string EmailBody = "Name=" + TextBox1.Text + "<br></br>" + "\n Phone=" +
TextBox2.Text + " Email=" + TextBox4.Text + " ProductName=" + TextBox6.Text +
" Message=" + TextBox3.Text + " Remote Host=" + RemoteHost;

Is there another way?
--
Thanks
Morris


Show quoteHide quote
"Morris Neuman" wrote:

> Hi,
>
> I want the EmailBody to have new line between fields.  Tried '\n' as well as
> "\n" but neither work.
>
> My string is as follows:
> string EmailBody = "Name=" + TextBox1.Text + '\n' + "Phone=" + TextBox2.Text
> + " Email=" + TextBox4.Text + " Message=" + TextBox3.Text + " Remote Host=" +
> RemoteHost;
>
> --
> Thanks
> Morris
Author
1 Jul 2009 2:33 AM
Allen Chen [MSFT]
Hi Morris,

>I was able to get a new line using <br></br>

>string EmailBody = "Name=" + TextBox1.Text + "<br></br>" + "\n Phone=" +
>TextBox2.Text + " Email=" + TextBox4.Text + " ProductName=" +
TextBox6.Text +
>" Message=" + TextBox3.Text + " Remote Host=" + RemoteHost;

>Is there another way?


This is the correct way to add a new line for HTML format. You could also
wrap text in <p> to create a new paragraph:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_paragraphs1

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msd***@microsoft.com.

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Author
1 Jul 2009 12:11 PM
Morris Neuman
OK Thanks.

What about the \n?  Why did that not work?
--
Thanks
Morris


Show quoteHide quote
"Allen Chen [MSFT]" wrote:

> Hi Morris,
>
> >I was able to get a new line using <br></br>
>
> >string EmailBody = "Name=" + TextBox1.Text + "<br></br>" + "\n Phone=" +
> >TextBox2.Text + " Email=" + TextBox4.Text + " ProductName=" +
> TextBox6.Text +
> >" Message=" + TextBox3.Text + " Remote Host=" + RemoteHost;
>
> >Is there another way?
>
>
> This is the correct way to add a new line for HTML format. You could also
> wrap text in <p> to create a new paragraph:
>
> http://www.w3schools.com/html/tryit.asp?filename=tryhtml_paragraphs1
>
> Regards,
> Allen Chen
> Microsoft Online Support
>
> Delighting our customers is our #1 priority. We welcome your comments and
> suggestions about how we can improve the support we provide to you. Please
> feel free to let my manager know what you think of the level of service
> provided. You can send feedback directly to my manager at:
> msd***@microsoft.com.
>
> ==================================================
> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.
>
> Note: MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 2 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions. Issues of this
> nature are best handled working with a dedicated Microsoft Support Engineer
> by contacting Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
>
>
Author
2 Jul 2009 2:21 AM
Allen Chen [MSFT]
Hi Morris,

>OK Thanks.

>What about the \n?  Why did that not work?

\n is not recognized as a line break in HTML. The valid tag is <br>. We
have to follow the HTML standard.

http://www.w3schools.com/TAGS/tag_br.asp

Regards,
Allen Chen
Microsoft Online Support
Author
7 Jul 2009 6:44 AM
Allen Chen [MSFT]
Hi Morris,

>OK Thanks.

>What about the \n?  Why did that not work?

Do you have additional questions? If you have please don't hesitate to let
me know.

Regards,
Allen Chen
Microsoft Online Support