DefaultHtmlGenerator.GenerateHiddenForCheckbox 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
为复选框生成其他 <输入类型=“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