HtmlHelper.Label(String, String, Object) 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 a <label> element for the specified expression
.
public:
virtual Microsoft::AspNetCore::Html::IHtmlContent ^ Label(System::String ^ expression, System::String ^ labelText, System::Object ^ htmlAttributes);
public Microsoft.AspNetCore.Html.IHtmlContent Label (string expression, string labelText, object htmlAttributes);
abstract member Label : string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
override this.Label : string * string * obj -> Microsoft.AspNetCore.Html.IHtmlContent
Public Function Label (expression As String, labelText As String, htmlAttributes As Object) As IHtmlContent
Parameters
- expression
- String
Expression name, relative to the current model.
- labelText
- String
The inner text of the element.
- htmlAttributes
- Object
An Object that contains the HTML attributes for the element. Alternatively, an IDictionary<TKey,TValue> instance containing the HTML attributes.
Returns
A new IHtmlContent containing the <label> element.