Bagikan melalui


DefaultHtmlGenerator.GenerateLabel Metode

Definisi

<Membuat elemen label>

public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateLabel(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression, System::String ^ labelText, System::Object ^ htmlAttributes);
public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateLabel (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer modelExplorer, string expression, string labelText, object htmlAttributes);
abstract member GenerateLabel : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GenerateLabel : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer * string * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Overridable Function GenerateLabel (viewContext As ViewContext, modelExplorer As ModelExplorer, expression As String, labelText As String, htmlAttributes As Object) As TagBuilder

Parameter

viewContext
ViewContext

Instans ViewContext untuk cakupan saat ini.

modelExplorer
ModelExplorer

ModelExplorer untuk expression.

expression
String

Nama ekspresi, relatif terhadap model saat ini. Digunakan untuk mengatur target label.

labelText
String

Teks yang digunakan untuk merender label ini.

htmlAttributes
Object

Yang Object berisi parameter untuk rute. Parameter diambil melalui refleksi dengan memeriksa properti .Object Ini Object biasanya dibuat menggunakan Object sintaks penginisialisasi. Atau, instans yang IDictionary<TKey,TValue> berisi parameter rute.

Mengembalikan

Penerapan

Berlaku untuk