Sugerir traducción
 
Otros han sugerido:

progress indicator
No hay más sugerencias.
Evaluar y enviar comentarios
Contraer todo/Expandir todo Contraer todo
Ver contenido:  en paraleloVer contenido: en paralelo
.NET Framework Class Library
AlternateView Class

Represents the format to view an email message.

System..::.Object
  System.Net.Mail..::.AttachmentBase
    System.Net.Mail..::.AlternateView

Namespace:  System.Net.Mail
Assembly:  System (in System.dll)
Visual Basic
Public Class AlternateView _
    Inherits AttachmentBase
C#
public class AlternateView : AttachmentBase
Visual C++
public ref class AlternateView : public AttachmentBase
F#
type AlternateView =  
    class
        inherit AttachmentBase
    end

The AlternateView type exposes the following members.

  NameDescription
Public methodAlternateView(Stream)Initializes a new instance of AlternateView with the specified Stream.
Public methodAlternateView(String)Initializes a new instance of AlternateView with the specified file name.
Public methodAlternateView(Stream, ContentType)Initializes a new instance of AlternateView with the specified Stream and ContentType.
Public methodAlternateView(Stream, String)Initializes a new instance of AlternateView with the specified Stream and media type.
Public methodAlternateView(String, ContentType)Initializes a new instance of AlternateView with the specified file name and content type.
Public methodAlternateView(String, String)Initializes a new instance of AlternateView with the specified file name and media type.
Top
  NameDescription
Public propertyBaseUriGets or sets the Base URI to use for resolving relative URIs in the AlternateView.
Public propertyContentIdGets or sets the MIME content ID for this attachment. (Inherited from AttachmentBase.)
Public propertyContentStreamGets the content stream of this attachment. (Inherited from AttachmentBase.)
Public propertyContentTypeGets the content type of this attachment. (Inherited from AttachmentBase.)
Public propertyLinkedResourcesGets the set of embedded resources referred to by this attachment.
Public propertyTransferEncodingGets or sets the encoding of this attachment. (Inherited from AttachmentBase.)
Top
  NameDescription
Public methodStatic memberCreateAlternateViewFromString(String)Creates a AlternateView of an email message using the content specified in a String.
Public methodStatic memberCreateAlternateViewFromString(String, ContentType)Creates an AlternateView of an email message using the content specified in a String and the specified MIME media type of the content.
Public methodStatic memberCreateAlternateViewFromString(String, Encoding, String)Creates an AlternateView of an email message using the content specified in a String, the specified text encoding, and MIME media type of the content.
Public methodDispose()()()Releases the resources used by the AttachmentBase. (Inherited from AttachmentBase.)
Protected methodDispose(Boolean)Releases the unmanaged resources used by the AlternateView and optionally releases the managed resources. (Overrides AttachmentBase..::.Dispose(Boolean).)
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

Use the AlternateView class to specify copies of an e-mail message in different formats. For example, if you send a message in HTML, you might also want provide a plain text version in case some of the recipients use e-mail readers that cannot display HTML content.

This class has two properties LinkedResources and BaseUri that are used to resolve URLs within the content of the email. LinkedResources is a collection of LinkedResource objects. When rendered, URLs within the e-mail's content are first matched against the URLs in the ContentLink of each LinkedResource object in the LinkedResources collection, and resolved. BaseUri is used by the mail reader to resolve relative URLs within the body, and also to resolve relative ContentLink URLs, in the LinkedResources collection.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role not supported), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Biblioteca de clases de .NET Framework
AlternateView (Clase)

Representa el formato para ver un mensaje de correo electrónico.

System..::.Object
  System.Net.Mail..::.AttachmentBase
    System.Net.Mail..::.AlternateView

Espacio de nombres:  System.Net.Mail
Ensamblado:  System (en System.dll)
Visual Basic
Public Class AlternateView _
    Inherits AttachmentBase
C#
public class AlternateView : AttachmentBase
Visual C++
public ref class AlternateView : public AttachmentBase
F#
type AlternateView =  
    class
        inherit AttachmentBase
    end

El tipo AlternateView expone los siguientes miembros.

  NombreDescripción
Método públicoAlternateView(Stream)Inicializa una nueva instancia de AlternateView con el valor Stream especificado.
Método públicoAlternateView(String)Inicializa una nueva instancia de la clase AlternateView con el nombre de archivo especificado.
Método públicoAlternateView(Stream, ContentType)Inicializa una nueva instancia de la clase AlternateView con la secuencia Stream especificada y el objeto ContentType especificado.
Método públicoAlternateView(Stream, String)Inicializa una nueva instancia de AlternateView con el flujo Stream y el tipo de medio especificados.
Método públicoAlternateView(String, ContentType)Inicializa una nueva instancia de AlternateView con el nombre de archivo y el tipo de contenido especificados.
Método públicoAlternateView(String, String)Inicializa una nueva instancia de AlternateView con el nombre de archivo y el tipo de medio especificados.
Arriba
  NombreDescripción
Propiedad públicaBaseUriObtiene o establece el URI base que se va a utilizar para resolver los URI relativos del objeto AlternateView.
Propiedad públicaContentIdObtiene o establece el id. de contenido MIME de estos datos adjuntos. (Se hereda de AttachmentBase).
Propiedad públicaContentStreamObtiene la secuencia de contenido de estos datos adjuntos. (Se hereda de AttachmentBase).
Propiedad públicaContentTypeObtiene el tipo de contenido de estos datos adjuntos. (Se hereda de AttachmentBase).
Propiedad públicaLinkedResourcesObtiene el conjunto de recursos incrustados a los que hacen referencia estos datos adjuntos.
Propiedad públicaTransferEncodingObtiene o establece la codificación de estos datos adjuntos. (Se hereda de AttachmentBase).
Arriba
  NombreDescripción
Método públicoMiembro estáticoCreateAlternateViewFromString(String)Crea un objeto AlternateView de un mensaje de correo electrónico usando el contenido especificado en un objeto String.
Método públicoMiembro estáticoCreateAlternateViewFromString(String, ContentType)Crea un objeto AlternateView de un mensaje de correo electrónico usando el contenido especificado en un objeto String y el tipo MIME del contenido especificado.
Método públicoMiembro estáticoCreateAlternateViewFromString(String, Encoding, String)Crea un objeto AlternateView de un mensaje de correo electrónico usando el contenido especificado en un objeto String, la codificación de texto y el tipo MIME del contenido especificados.
Método públicoDispose()()()Libera los recursos usados por AttachmentBase. (Se hereda de AttachmentBase).
Método protegidoDispose(Boolean)Libera los recursos no administrados utilizados por el objeto AlternateView y, de forma opcional, libera los recursos administrados. (Invalida a AttachmentBase..::.Dispose(Boolean)).
Método públicoEquals(Object)Determina si el objeto Object especificado es igual al objeto Object actual. (Se hereda de Object).
Método protegidoFinalizePermite que un objeto intente liberar recursos y realizar otras operaciones de limpieza antes de ser reclamado por la recolección de elementos no utilizados. (Se hereda de Object).
Método públicoGetHashCodeActúa como función hash para un tipo concreto. (Se hereda de Object).
Método públicoGetTypeObtiene el objeto Type de la instancia actual. (Se hereda de Object).
Método protegidoMemberwiseCloneCrea una copia superficial del objeto Object actual. (Se hereda de Object).
Método públicoToStringDevuelve una cadena que representa el objeto actual. (Se hereda de Object).
Arriba

Utilice la clase AlternateView para especificar copias de un mensaje de correo electrónico en distintos formatos. Por ejemplo, si envía un mensaje en formato HTML, puede que también desee enviar una versión de texto sin formato en caso de que algunos de los destinatarios usen lectores de correo electrónico que no puedan mostrar contenido HTML.

Esta clase tiene dos propiedades, LinkedResources y BaseUri, que se utilizan para resolver direcciones URL dentro del contenido del mensaje de correo electrónico. LinkedResources es una colección de objetos LinkedResource. Cuando se representa, direcciones URL dentro del contenido del correo electrónico coinciden primero con las direcciones URL en ContentLink de cada objeto LinkedResource en la colección LinkedResources y se resuelve. El lector de correo usa BaseUri para resolver direcciones URL relativas dentro del cuerpo y también para resolver direcciones URL ContentLink relativas en la colección LinkedResources.

.NET Framework

Compatible con: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Compatible con: 4, 3.5 SP1

Windows 7, Windows Vista SP1 o posterior, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (no se admite Server Core), Windows Server 2008 R2 (se admite Server Core con SP1 o posterior), Windows Server 2003 SP2

.NET Framework no admite todas las versiones de todas las plataformas. Para obtener una lista de las versiones compatibles, vea Requisitos de sistema de .NET Framework.
Todos los miembros static (Shared en Visual Basic) públicos de este tipo son seguros para la ejecución de subprocesos. No se garantiza que los miembros de instancias sean seguros para la ejecución de subprocesos.
Contenido de la comunidad   ¿Qué es Community Content?
Agregar contenido nuevo RSS  Anotaciones
Processing
© 2012 Microsoft. Reservados todos los derechos. Términos de uso | Marcas Registradas | Privacidad
Page view tracker