共用方式為


DefaultHtmlGenerator.GenerateHiddenForCheckbox 方法

定義

針對核取方塊,產生其他 < 輸入類型=「hidden」.../ > 。 這可解決未核取核取方塊未在要求中傳送的情況。 傳送隱藏的輸入可讓您知道提交要求時,該核取方塊會出現在頁面上。

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

參數

viewContext
ViewContext
modelExplorer
ModelExplorer
expression
String

傳回

實作

適用於