共用方式為


IHtmlGenerator.GenerateHiddenForCheckbox 方法

定義

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

public:
 Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateHiddenForCheckbox(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ modelExplorer, System::String ^ expression);
public 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
Public Function GenerateHiddenForCheckbox (viewContext As ViewContext, modelExplorer As ModelExplorer, expression As String) As TagBuilder

參數

viewContext
ViewContext
modelExplorer
ModelExplorer
expression
String

傳回

適用於