System.Web.UI.WebControls.CommandField.NewImageUrl Property

Gets or sets the URL to an image to display for the New button in a System.Web.UI.WebControls.CommandField field.

Syntax

[System.ComponentModel.DefaultValue("")]
[System.Web.UI.UrlProperty]
[System.ComponentModel.Editor("System.Web.UI.Design.ImageUrlEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public virtual string NewImageUrl { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

When the ButtonFieldBase.ButtonType property of a System.Web.UI.WebControls.CommandField field is set to ButtonType.Image, use the CommandField.NewImageUrl property to specify the image to display for the New button. This image can be in any file format (.jpg, .gif, .bmp, and so on), as long as the client's browser supports that format.

Note:

As an alternative to displaying an image for the New button, you can display text by first setting the ButtonFieldBase.ButtonType property to ButtonType.Button or ButtonType.Link and then setting the CommandField.NewText property.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0