Wednesday, 14 August 2013

how to store html code EMail template in a string variable or textbox c#

how to store html code EMail template in a string variable or textbox c#

In my program user will select template message and it will show up in the
body textbox. The template is in HTML Format.
if(templatelistbox.SelectedItem.ToString().Equals("Order Processing"))
{
string m;
i want to store the below html to string.
<body>
<table width="580" align="center" cellpadding="0" cellspacing="0"
bgcolor="#FFFFFF">
<tbody>
<tr>
<td colspan="2" align="right" valign="middle" width="580"
height="60" bgcolor="00496f"><div
wotsearchtarget="flipkart.com"></div></td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle" width="580"
bgcolor="3bb1d7"><p><strong>Order Confirmed!</strong></p></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" width="580"
bgcolor="ffffff"><p>&nbsp;</p>
<p>Dear <strong>Praveen,</strong></p>
<p>Greetings from Prostyle PC Kart</p>
<p>We thank you for your order. This email contains your order
summary. When the item(s) in your order are ready to ship, you
will receive an email with the Courier Tracking ID and the link
where you can track your order. You can also check the status of
your order on <strong>ebay.in</strong></p>
Please find below the summary of your order <strong> OD3</strong></a>
at Prostyle Pc Kart Seller of eBay.in:
</p></td>
</tr>
<tr>
<td colspan="2" align="left" valign="top" width="580"
bgcolor="ffffff"><table border="0" cellspacing="0" cellpadding="0"
width="580">
<tbody>
<tr>
<td colspan="7"><p><strong>Order ID: OD3
| Seller ID : eshop.prostylepc.in</strong></p>
<p> <strong>Item (s) Ordered:</strong></p></td>
</tr>
<tr>
<td width="274" valign="top"><p><strong>Product
Details</strong></p></td>
<td width="112" valign="top"><p><strong>Shipping
Date</strong></p></td>
<td width="62" valign="top"><p><strong>Ordered
Quantity</strong></p></td>
<td width="132"
valign="top"><p><center><strong>Price</strong></center></p></td>
</tr>
<tr>
<td width="274" valign="top"><p>XOLO Q800</p>
</td>
<td width="112" valign="top"><p>&nbsp;</p></td>
<td width="62" valign="top"><center><p>1</p></center></td>
<td width="132" valign="top" align="center"><p>Rs. 9700</p></td>
<tr>
<td width="274" valign="top"><p>Samsung BHM1100NBEGINU
In-the-ear Headset without Charger</p>
</td>
<td width="112" valign="top"><p>&nbsp;</p></td>
<td width="62" valign="top"><center><p>1</p></center></td>
<td width="132" valign="top" align="center"><p>Rs. 699</p></td>
</tr>
<tr>
<td colspan="2"><p>Shipping Charge</p></td>
<td width="62"><center><p>FREE</p></center></td>
</tr>
<tr>
<td valign="top" colspan="3"><p><strong>Total</strong></p></td>
<td width="132" valign="top"><p><strong>Rs.
9700</strong></p></td>
</tr>
<tr>
.......................................................
bodytbox.Text = m;
}
Tell me any way to insert this html code in c# or variable or how to send
this template via a email.(Alternative) Thanks In advance

No comments:

Post a Comment