Language

[How Do I:] Embed an Image in an Email with ASP.NET

By |19 minutes|
Chris Pels shows how to embed an image in an email with ASP.NET. He creates a web form (with fields for To, From, Subject, and Body), uses the AlternateView class to create text and HTML versions of an email, stores an image in a LinkedResource class instance, embeds it in the HTML AlternateView. He then adds both versions to the MailMessage object and sends the email twice, first with HTML-receiving capabilities enabled and then as text-only. Both email messages appear in Outlook. The HTML version shows the embedded image; the text version does not.

DOWNLOADS: Code (C#)|Code (VB)|MP3|MP4|WMV

Chris Pels

By Chris Pels, Chris has been instrumental in the architecture, development, and implementation of a wide variety of business systems and databases as a technology consultant since 1986. He has extensive experience in business analysis, technical specifications, database design, several programming languages including C# and VB.NET, and statistical analysis. He holds a Ph.D. from The University of Michigan and has been a speaker at Microsoft TechEd, Microsoft DevDays, VSLive, numerous events in New England

Table of Contents

How Do I?

Tailspin Spyworks

Building 3.5 Applications

Authentication

SQL 2005

VS 2005

Migrating

Building 2.0 Applications

IIS

Visual Studio 2010

Ajax Control Toolkit

ASP.NET AJAX

Data Access

ASP.NET Dynamic Data

ASP.NET 3.5

jQuery

.NET 4

ASP.NET Web Forms vNext

ASP.NET vNext

Visual Studio vNext

Pluralsight Introduction to ASP.NET 4 WebForms