DefaultHtmlGenerator.GenerateForm 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
生成 < 窗体 > 元素。 当用户提交表单时,具有名称 actionName
的操作将处理请求。
public:
virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateForm(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ actionName, System::String ^ controllerName, System::Object ^ routeValues, System::String ^ method, System::Object ^ htmlAttributes);
public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateForm (Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string actionName, string controllerName, object routeValues, string method, object htmlAttributes);
abstract member GenerateForm : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * obj * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GenerateForm : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * obj * string * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
Public Overridable Function GenerateForm (viewContext As ViewContext, actionName As String, controllerName As String, routeValues As Object, method As String, htmlAttributes As Object) As TagBuilder
参数
- viewContext
- ViewContext
ViewContext当前范围的 实例。
- actionName
- String
操作方法的名称。
- controllerName
- String
控制器的名称。
- routeValues
- Object
一 Object 个包含路由参数的 。 通过检查 的属性,通过反射检索参数 Object 。 这 Object 通常是使用初始 Object 值表达式语法创建的。 或者, IDictionary<TKey,TValue> 包含路由参数的实例。
- method
- String
用于处理窗体的 HTTP 方法(GET 或 POST)。
- htmlAttributes
- Object
一 Object 个 ,它包含 元素的 HTML 特性。 或者, IDictionary<TKey,TValue> 一个包含 HTML 属性的 实例。
返回
TagBuilder < /form 元素的 > 实例。