Click here to Skip to main content
15,994,910 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have html page, which contain a div



i want to add dynamically image path in above div , and send to as mail by c#. But the background image is not showing in my email, i do not requries

What I have tried:

AlternateView View = default(AlternateView);
LinkedResource resource = default(LinkedResource);
View = AlternateView.CreateAlternateViewFromString(body, null, "text/html");
resource = new LinkedResource(HttpContext.Current.Server.MapPath("abc.png"));
resource.ContentId = "bodyimage";
resource.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
View.LinkedResources.Add(resource);
Posted
Updated 20-Feb-17 2:12am

Check this link:


[^]
 
Share this answer
 
i tried but not working, not required ,require: <div style="background-image:url(cid:bodyimage);>
 
Share this answer
 
Comments
Graeme_Grant 20-Feb-17 8:25am    
In the sidebar (right-hand-side) of this page labeled Related Questions there are nine (9) other suggests on how to do this. You might want to take the time to check them out.

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