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

返回

TagBuilder

实现

适用于