DefaultHtmlGenerator.GenerateRouteLink 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
< >为指向操作的链接生成元素。
public:
 virtual Microsoft::AspNetCore::Mvc::Rendering::TagBuilder ^ GenerateRouteLink(Microsoft::AspNetCore::Mvc::Rendering::ViewContext ^ viewContext, System::String ^ linkText, System::String ^ routeName, System::String ^ protocol, System::String ^ hostName, System::String ^ fragment, System::Object ^ routeValues, System::Object ^ htmlAttributes);public virtual Microsoft.AspNetCore.Mvc.Rendering.TagBuilder GenerateRouteLink(Microsoft.AspNetCore.Mvc.Rendering.ViewContext viewContext, string linkText, string routeName, string protocol, string hostName, string fragment, object routeValues, object htmlAttributes);abstract member GenerateRouteLink : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilder
override this.GenerateRouteLink : Microsoft.AspNetCore.Mvc.Rendering.ViewContext * string * string * string * string * string * obj * obj -> Microsoft.AspNetCore.Mvc.Rendering.TagBuilderPublic Overridable Function GenerateRouteLink (viewContext As ViewContext, linkText As String, routeName As String, protocol As String, hostName As String, fragment As String, routeValues As Object, htmlAttributes As Object) As TagBuilder参数
- viewContext
- ViewContext
当前 ViewContext 范围的 实例。
- linkText
- String
要插入元素中的文本。
- routeName
- String
要用于链接生成的路由的名称。
- protocol
- String
生成的链接的协议 (方案) 。
- hostName
- String
生成的链接的主机名。
- fragment
- String
所生成链接的片段。
- routeValues
- Object
一个 Object ,其中包含路由的参数。 通过检查 的属性 Object,通过反射检索参数。 这 Object 通常是使用 Object 初始值设定项语法创建的。 或者,包含 IDictionary<TKey,TValue> 路由参数的 实例。
- htmlAttributes
- Object
一个 Object ,其中包含元素的 HTML 属性。 或者,一个 IDictionary<TKey,TValue> 包含 HTML 属性的 实例。
返回
TagBuilder元素的 <实例>。