|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Email Body New LineHi,
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 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? -- Show quoteHide quoteThanks Morris "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 Hi Morris,
>I was able to get a new line using <br></br> This is the correct way to add a new line for HTML format. You could also >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? 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. OK Thanks.
What about the \n? Why did that not work? -- Show quoteHide quoteThanks Morris "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. > > > > Hi Morris,
>OK Thanks. \n is not recognized as a line break in HTML. The valid tag is <br>. We >What about the \n? Why did that not work? have to follow the HTML standard. http://www.w3schools.com/TAGS/tag_br.asp Regards, Allen Chen Microsoft Online Support Hi Morris,
>OK Thanks. Do you have additional questions? If you have please don't hesitate to let >What about the \n? Why did that not work? me know. Regards, Allen Chen Microsoft Online Support |
|||||||||||||||||||||||