Using LinkedResource Class for Sending HTML E-mail in .NET 2.0
page 3 of 7
by Soyuj Kumar Sahoo
Feedback
Average Rating: 
Views (Total / Last 10 Days): 62873/ 78

Supported Constructors

For initializing the new instance of LinkedResource, the .NET 2.0 Framework supports six overloaded constructors. These are used for setting different initial parameters with a common goal for getting the content of an embedded resource. These constructors are:

1.    LinkedResource (contentStream as System.IO.Stream): Initializes a new instance of LinkedResource using the supplied Stream.

2.    LinkedResource (fileName as String): Initializes a new instance of LinkedResource using the specified file name.

3.    LinkedResource (contentStream as System.IO.Stream, contentType as ContentType): Initializes a new instance of LinkedResource with the values supplied by Stream and ContentType.

4.    LinkedResource (contentStream as System.IO.Stream, mediaType as String): Initializes a new instance of LinkedResource with the specified Stream and MIME media type.

5.    LinkedResource (fileName as String, contentType as ContentType): Initializes a new instance of LinkedResource with the specified file name and content type.

6.    LinkedResource (fileName as String, mediaType as String): Initializes a new instance of LinkedResource with the specified file name and MIME media type.


View Entire Article

User Comments

Title: hi   
Name: jagadeesh
Date: 2012-09-26 3:56:19 AM
Comment:
cdfgd
Title: Nice Article   
Name: Sankara Narayanan
Date: 2011-01-03 7:01:55 AM
Comment:
Thank you very much, i tried its working fine. i have one doubt how can i set background image? i tried as you mention, but i cant. please help me.

Thanks & Regards
Sankara Naryananan
Title: Thank you from Mexico   
Name: Marcelino Ramirez Maldonado
Date: 2010-05-07 9:29:02 PM
Comment:
Thank you. Together with your another article and this one, they are the best mail sending articles i have seen in my life!!

¡Muchas gracias!
Title: hi   
Name: Sumit Kalra
Date: 2010-04-18 3:03:57 AM
Comment:
Though this code image not display at IE8
Title: can you provide an example embedding into word (not mail)   
Name: Chuck Farah
Date: 2009-01-06 3:24:11 PM
Comment:
I am trying to provide an embedd type of feature only in a word doc downloaded to their pc. i have tried this by using the src property for the image.

i use response.Write(strBody)
Title: Will not send AlternateView through server   
Name: Nick
Date: 2008-01-25 7:26:57 AM
Comment:
Hi,

This is a great article, very well explained. There's is a problem I have with the AlternateView though.

I have had the code working great locally with some nice results, however when I transfer the files onto a server the AlternativeView seems to stop the mail from sending. I have commented this out and a plain mail message sends fine on the server. So i know everything works except for when I try and use the AlternateView.


Have you ever come across this proble?

Cheers
Title: Great   
Name: Esteban
Date: 2007-11-08 3:37:53 PM
Comment:
Great article, very usefull how to add the image, thanx once again!!!
tete

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-29 3:53:22 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search