ImageExtensions.Image Method (HtmlHelper, String)
Displays the image with the specified parameters.
Namespace: Microsoft.Web.Mvc
Assembly: Microsoft.Web.Mvc (in Microsoft.Web.Mvc.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function Image ( _
helper As HtmlHelper, _
imageRelativeUrl As String _
) As MvcHtmlString
'Usage
Dim helper As HtmlHelper
Dim imageRelativeUrl As String
Dim returnValue As MvcHtmlString
returnValue = helper.Image(imageRelativeUrl)
public static MvcHtmlString Image(
this HtmlHelper helper,
string imageRelativeUrl
)
[ExtensionAttribute]
public:
static MvcHtmlString^ Image(
HtmlHelper^ helper,
String^ imageRelativeUrl
)
static member Image :
helper:HtmlHelper *
imageRelativeUrl:string -> MvcHtmlString
public static function Image(
helper : HtmlHelper,
imageRelativeUrl : String
) : MvcHtmlString
Parameters
- helper
Type: System.Web.Mvc.HtmlHelper
The html helper.
- imageRelativeUrl
Type: System.String
The string image of the relative Url.
Return Value
Type: System.Web.Mvc.MvcHtmlString
An HTML encoded string.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type HtmlHelper. When you use instance method syntax to call this method, omit the first parameter. For more information, see https://msdn.microsoft.com/en-us/library/bb384936(v=vs.118) or https://msdn.microsoft.com/en-us/library/bb383977(v=vs.118).