HtmlHelper.Value(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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:
virtual System::String ^ Value(System::String ^ expression, System::String ^ format);
public string Value (string expression, string format);
abstract member Value : string * string -> string
override this.Value : string * string -> string
Public Function Value (expression As String, format As String) As String
Parameters
- expression
- String
Expression name, relative to the current model.
- format
- 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.
Returns
A String containing the formatted value.