Share via


ImageExtensions.Image Method

 

Provides image extensions with the specified parameters.

Namespace:   Microsoft.Web.Mvc
Assembly:  Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)

Overload List

Name Description
System_CAPS_pubmethodSystem_CAPS_static Image(HtmlHelper, String)

Displays the image with the specified parameters.

System_CAPS_pubmethodSystem_CAPS_static Image(HtmlHelper, String, IDictionary<String, Object>)

Displays the image with the specified parameters.

System_CAPS_pubmethodSystem_CAPS_static Image(HtmlHelper, String, Object)

Displays the image with the specified parameters.

System_CAPS_pubmethodSystem_CAPS_static Image(HtmlHelper, String, String)

Displays the image with the specified parameters.

System_CAPS_pubmethodSystem_CAPS_static Image(HtmlHelper, String, String, IDictionary<String, Object>)

Displays the image with the specified parameters.

System_CAPS_pubmethodSystem_CAPS_static Image(HtmlHelper, String, String, Object)

Displays the image with the specified parameters.

System_CAPS_pubmethodSystem_CAPS_static Image(String, String, IDictionary<String, Object>)

Displays the image with the specified parameters.

See Also

ImageExtensions Class
Microsoft.Web.Mvc Namespace

Return to top

ImageExtensions.Image Method (HtmlHelper, String)

Displays the image with the specified parameters.

Syntax

public static MvcHtmlString Image(
    this HtmlHelper helper,
    string imageRelativeUrl
)
public:
[ExtensionAttribute]
static MvcHtmlString^ Image(
    HtmlHelper^ helper,
    String^ imageRelativeUrl
)
static member Image : 
        helper:HtmlHelper *
        imageRelativeUrl:string -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function Image (
    helper As HtmlHelper,
    imageRelativeUrl As String
) As MvcHtmlString

Parameters

  • imageRelativeUrl
    Type: System.String

    The string image of the relative Url.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML encoded string.

Return to top

ImageExtensions.Image Method (HtmlHelper, String, IDictionary<String, Object>)

Displays the image with the specified parameters.

Syntax

public static MvcHtmlString Image(
    this HtmlHelper helper,
    string imageRelativeUrl,
    IDictionary<string, object> htmlAttributes
)
public:
[ExtensionAttribute]
static MvcHtmlString^ Image(
    HtmlHelper^ helper,
    String^ imageRelativeUrl,
    IDictionary<String^, Object^>^ htmlAttributes
)
static member Image : 
        helper:HtmlHelper *
        imageRelativeUrl:string *
        htmlAttributes:IDictionary<string, Object> -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function Image (
    helper As HtmlHelper,
    imageRelativeUrl As String,
    htmlAttributes As IDictionary(Of String, Object)
) As MvcHtmlString

Parameters

  • imageRelativeUrl
    Type: System.String

    The string image of the relative Url.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML encoded string.

Return to top

ImageExtensions.Image Method (HtmlHelper, String, Object)

Displays the image with the specified parameters.

Syntax

public static MvcHtmlString Image(
    this HtmlHelper helper,
    string imageRelativeUrl,
    object htmlAttributes
)
public:
[ExtensionAttribute]
static MvcHtmlString^ Image(
    HtmlHelper^ helper,
    String^ imageRelativeUrl,
    Object^ htmlAttributes
)
static member Image : 
        helper:HtmlHelper *
        imageRelativeUrl:string *
        htmlAttributes:Object -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function Image (
    helper As HtmlHelper,
    imageRelativeUrl As String,
    htmlAttributes As Object
) As MvcHtmlString

Parameters

  • imageRelativeUrl
    Type: System.String

    The string image of the relative Url.

  • htmlAttributes
    Type: System.Object

    The non-generic collection of html attributes.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML encoded string.

Return to top

ImageExtensions.Image Method (HtmlHelper, String, String)

Displays the image with the specified parameters.

Syntax

public static MvcHtmlString Image(
    this HtmlHelper helper,
    string imageRelativeUrl,
    string alt
)
public:
[ExtensionAttribute]
static MvcHtmlString^ Image(
    HtmlHelper^ helper,
    String^ imageRelativeUrl,
    String^ alt
)
static member Image : 
        helper:HtmlHelper *
        imageRelativeUrl:string *
        alt:string -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function Image (
    helper As HtmlHelper,
    imageRelativeUrl As String,
    alt As String
) As MvcHtmlString

Parameters

  • imageRelativeUrl
    Type: System.String

    The string image of the relative Url.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML encoded string.

Return to top

ImageExtensions.Image Method (HtmlHelper, String, String, IDictionary<String, Object>)

Displays the image with the specified parameters.

Syntax

public static MvcHtmlString Image(
    this HtmlHelper helper,
    string imageRelativeUrl,
    string alt,
    IDictionary<string, object> htmlAttributes
)
public:
[ExtensionAttribute]
static MvcHtmlString^ Image(
    HtmlHelper^ helper,
    String^ imageRelativeUrl,
    String^ alt,
    IDictionary<String^, Object^>^ htmlAttributes
)
static member Image : 
        helper:HtmlHelper *
        imageRelativeUrl:string *
        alt:string *
        htmlAttributes:IDictionary<string, Object> -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function Image (
    helper As HtmlHelper,
    imageRelativeUrl As String,
    alt As String,
    htmlAttributes As IDictionary(Of String, Object)
) As MvcHtmlString

Parameters

  • imageRelativeUrl
    Type: System.String

    The string image of the relative Url.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML encoded string.

Return to top

ImageExtensions.Image Method (HtmlHelper, String, String, Object)

Displays the image with the specified parameters.

Syntax

public static MvcHtmlString Image(
    this HtmlHelper helper,
    string imageRelativeUrl,
    string alt,
    object htmlAttributes
)
public:
[ExtensionAttribute]
static MvcHtmlString^ Image(
    HtmlHelper^ helper,
    String^ imageRelativeUrl,
    String^ alt,
    Object^ htmlAttributes
)
static member Image : 
        helper:HtmlHelper *
        imageRelativeUrl:string *
        alt:string *
        htmlAttributes:Object -> MvcHtmlString
<ExtensionAttribute>
Public Shared Function Image (
    helper As HtmlHelper,
    imageRelativeUrl As String,
    alt As String,
    htmlAttributes As Object
) As MvcHtmlString

Parameters

  • imageRelativeUrl
    Type: System.String

    The string image of the relative Url.

  • htmlAttributes
    Type: System.Object

    The non-generic collection of html attributes.

Return Value

Type: System.Web.Mvc.MvcHtmlString

An HTML encoded string.

Return to top

ImageExtensions.Image Method (String, String, IDictionary<String, Object>)

Displays the image with the specified parameters.

Syntax

public static TagBuilder Image(
    string imageUrl,
    string alt,
    IDictionary<string, object> htmlAttributes
)
public:
static TagBuilder^ Image(
    String^ imageUrl,
    String^ alt,
    IDictionary<String^, Object^>^ htmlAttributes
)
static member Image : 
        imageUrl:string *
        alt:string *
        htmlAttributes:IDictionary<string, Object> -> TagBuilder
Public Shared Function Image (
    imageUrl As String,
    alt As String,
    htmlAttributes As IDictionary(Of String, Object)
) As TagBuilder

Parameters

Return Value

Type: System.Web.Mvc.TagBuilder

An HTML encoded string.

Return to top