System.Web.UI.Design.MailFileEditor Class

Provides a user interface for selecting and editing a mail file name for a property at design time.

See Also: MailFileEditor Members


public class MailFileEditor : UrlEditor


The System.Web.UI.Design.MailFileEditor class is an System.Drawing.Design.UITypeEditor object that can be used at design time to select and edit a mail file name as a string, and assign the string to a control property. For example, the System.Web.UI.WebControls.EmbeddedMailObject control uses the System.Web.UI.Design.MailFileEditor class at design time to set the value of the System.Web.UI.WebControls.EmbeddedMailObject.Path property.

Use the System.ComponentModel.EditorAttribute attribute to associate the System.Web.UI.Design.MailFileEditor with a property. When the associated property is edited in the design surface, the designer host calls the erload:System.Web.UI.Design.UrlEditor.EditValue method. The erload:System.Web.UI.Design.UrlEditor.EditValue method displays a dialog box for selecting a mail file name from a filtered list of files, and returns the file name that is selected by the user. The erload:System.Web.UI.Design.UrlEditor.GetEditStyle method indicates the display style of the user interface.

Derive a class from the System.Web.UI.Design.MailFileEditor to define a custom editor for a mail file name property. For example, a derived class can override the erload:System.Web.UI.Design.UrlEditor.EditValue method, and display an System.Windows.Forms.OpenFileDialog instance with a custom mail file filter or title.


Namespace: System.Web.UI.Design
Assembly: System.Design (in System.Design.dll)
Assembly Versions: