IHtmlHelper.Value(String, String) IHtmlHelper.Value(String, String) IHtmlHelper.Value(String, String) Method


Returns the formatted value for the specified expression. Specifically, returns the first non-null value found in: the ModelState entry with full name, the ViewData entry with full name, or the expression evaluated against Model. See Name(String) for more information about a "full name".

public string Value (string expression, string format);
abstract member Value : string * string -> string
Public Function Value (expression As String, format As String) As String


String String String

Expression name, relative to the current model.

String String String

The format string (see https://msdn.microsoft.com/en-us/library/txafckwd.aspx) used to format the return value unless that came from model binding.


A String containing the formatted value.


Converts the expression result to a String directly if format is null or empty.

Applies to