Hi i wanted to display an image while html code generates in code behind in asp.net..Below i have provided my code please go throgh and rectify it...
System.Web.UI.WebControls.Image img = new System.Web.UI.WebControls.Image();
img.ImageUrl = "~/images/sample_seller.gif";
dt = ee.GetContactDetails(CustId);
StringBuilder sb = new StringBuilder();
if (dt.Rows.Count > 0)
{
sb.AppendLine("<html><body><center><table width='100%' cellspacing='0' border='1'");
sb.AppendLine("<tr>");
sb.AppendLine("<td colspan='4' width='100%' align='center' style='background-color: #FFAA2B;'>");
sb.AppendLine(img.ToString());
sb.AppendLine("</td>");
sb.AppendLine("</tr>");
sb.AppendLine("</table></center></body></html>");
}
in my output i am just getting as
System.Web.UI.WebControls.Image instead of showing an image
Join Hands Change lives
Thanks & Regards
Straight Edge Society