---
title: "How to insert image in message body"  
description: "How to insert image in message body"  
author: "Anonymous User"  
published: 2013-12-23  
updated: 2013-12-23  
canonical: https://www.mindstick.com/forum/1840/how-to-insert-image-in-message-body  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to insert image in message body

[message](https://www.mindstick.com/forum/12802/show-confirmation-message-yes-or-no-in-asp-dot-net).Body = "Dear " + myds.Tables[0].Rows[0].Field<[string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp)>("C_Name").ToString()

+ " <br /> <br /> Your Registrtion is Successfull...<br/><br/>

<[table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) border='4'><tr><td>[Name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) = "

+ myds.Tables[0].Rows[0].Field<string>("C_Name").ToString()

+ " </td><td> Pax= "

+ myds.Tables[1].Rows[0].Field<[int](https://www.mindstick.com/forum/159137/how-to-convert-date-int-to-date-in-sql)>("pax").ToString()

+ "</td> </tr><tr><td>Della [Adventure](https://yourviews.mindstick.com/story/1800/best-adventure-destinations-in-india),Kunegao,Lonavala</td><td>CheckIn [Date](https://yourviews.mindstick.com/story/3869/propose-day-2024-exciting-date-ideas-for-you-and-your-partner)= "

+ myds.Tables[0].Rows[0].Field<string>("Checkin_date").ToString()

+ "</td></tr></table>";

This is my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) and I want to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) [image](https://www.mindstick.com/articles/23551/an-investigate-distinctive-seafood-restaurant-for-your-image-stamp-character) in the message body.

## Replies

### Reply by Pravesh Singh

Hi Alex,

Use image tag to display the image in you body of the mail.

Instead of storing the image in to DB.Do the following steps

Just upload the image in to you're server location.

Store the image path in to DB

Get the image path from DB and bind it to image source.

**For Example.**

<img height="" width="" border="0" alt="" src="https://www.xyz.com/images/123.jpg"></img>

## Bindling the image URL

<tr><td> <img height="" width="" border="0" alt=" src="+ myds.Tables[1].Rows[0].Field<string>("imageurl").ToString() + "></img></td> </tr>

## Your entire code could be:

```
message.Body = "Dear " + myds.Tables[0].Rows[0].Field<string>("C_Name").ToString() + " <br /> <br /> Your Registrtion is Successfull...<br/><br/><table  border='4'><tr><td>Name = " + myds.Tables[0].Rows[0].Field<string>("C_Name").ToString() + " </td><td> Pax= " + myds.Tables[1].Rows[0].Field<int>("pax").ToString() + "</td> </tr>**<tr><td> <img height="" width="" border="0" alt=" src="+ myds.Tables[1].Rows[0].Field<string>("imageurl").ToString() + "></img></td> </tr>**<tr><td>Della Adventure,Kunegao,Lonavala</td><td>CheckIn Date= " + myds.Tables[0].Rows[0].Field<string>("Checkin_date").ToString() + "</td></tr></table>";
```


---

Original Source: https://www.mindstick.com/forum/1840/how-to-insert-image-in-message-body

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
