Click here to Skip to main content
15,902,939 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
VB
s = Server.MapPath(dr.Item(i).ToString)
                            s = s.Replace("/", "\")
                            htmlWrite.AddAttribute(HtmlTextWriterAttribute.Style, "Width:50px;Height:50;	")
                            htmlWrite.RenderBeginTag(HtmlTextWriterTag.Td)
                            htmlWrite.Write("<div><img src='" & s & "'  alt='Smiley face' height='50' width='50' align='middle' style='padding: 2cm 2cm 2cm 2cm;'  > </img></div> ")
Posted
Updated 16-Mar-15 22:28pm
v4
Comments
Mario Z 17-Mar-15 4:41am    
Can you explain a bit what exactly are you doing?
I mean you just posted a snippet code of some HTML writing, unfortunately I don't believe anyone can provide you any help just with that information.

Nevertheless I presume you are writing a HTML content and then saving it with an XLS extension, is this right? This is a somewhat known workaround (although I personally don’t like it) because MS Excel will be able to read that content (but it will throw a warning and that's why I don't recommend this approach).
If this is true then can you post the image's source path that you get in your output file (img src="What is here?")?
Maciej Los 17-Mar-15 10:12am    
I do not see any Excel object...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900