PageLinkGeneratorExtensions.GetPathByPage PageLinkGeneratorExtensions.GetPathByPage PageLinkGeneratorExtensions.GetPathByPage Method

Definition

Overloads

GetPathByPage(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions) GetPathByPage(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions) GetPathByPage(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions)

Generates a URI with an absolute path based on the provided values.

GetPathByPage(LinkGenerator, HttpContext, String, String, Object, Nullable<PathString>, FragmentString, LinkOptions) GetPathByPage(LinkGenerator, HttpContext, String, String, Object, Nullable<PathString>, FragmentString, LinkOptions)

Generates a URI with an absolute path based on the provided values.

GetPathByPage(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions) GetPathByPage(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions) GetPathByPage(LinkGenerator, String, String, Object, PathString, FragmentString, LinkOptions)

Generates a URI with an absolute path based on the provided values.

public static string GetPathByPage (this Microsoft.AspNetCore.Routing.LinkGenerator generator, string page, string handler = null, object values = null, Microsoft.AspNetCore.Http.PathString pathBase = null, Microsoft.AspNetCore.Http.FragmentString fragment = null, Microsoft.AspNetCore.Routing.LinkOptions options = null);
static member GetPathByPage : Microsoft.AspNetCore.Routing.LinkGenerator * string * string * obj * Microsoft.AspNetCore.Http.PathString * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string
<Extension()>
Public Function GetPathByPage (generator As LinkGenerator, page As String, Optional handler As String = null, Optional values As Object = null, Optional pathBase As PathString = null, Optional fragment As FragmentString = null, Optional options As LinkOptions = null) As String

Parameters

page
String String String

The page name. Used to resolve endpoints.

handler
String String String

The page handler name. Used to resolve endpoints. Optional.

values
Object Object Object

The route values. Optional. Used to resolve endpoints and expand parameters in the route template.

pathBase
PathString PathString PathString

An optional URI path base. Prepended to the path in the resulting URI.

fragment
FragmentString FragmentString FragmentString

A URI fragment. Optional. Appended to the resulting URI.

options
LinkOptions LinkOptions LinkOptions

An optional LinkOptions. Settings on provided object override the settings with matching names from RouteOptions.

Returns

A URI with an absolute path, or null if a URI cannot be created.

GetPathByPage(LinkGenerator, HttpContext, String, String, Object, Nullable<PathString>, FragmentString, LinkOptions) GetPathByPage(LinkGenerator, HttpContext, String, String, Object, Nullable<PathString>, FragmentString, LinkOptions)

Generates a URI with an absolute path based on the provided values.

public static string GetPathByPage (this Microsoft.AspNetCore.Routing.LinkGenerator generator, Microsoft.AspNetCore.Http.HttpContext httpContext, string page = null, string handler = null, object values = null, Nullable<Microsoft.AspNetCore.Http.PathString> pathBase = null, Microsoft.AspNetCore.Http.FragmentString fragment = null, Microsoft.AspNetCore.Routing.LinkOptions options = null);
static member GetPathByPage : Microsoft.AspNetCore.Routing.LinkGenerator * Microsoft.AspNetCore.Http.HttpContext * string * string * obj * Nullable<Microsoft.AspNetCore.Http.PathString> * Microsoft.AspNetCore.Http.FragmentString * Microsoft.AspNetCore.Routing.LinkOptions -> string

Parameters

httpContext
HttpContext HttpContext HttpContext

The HttpContext associated with the current request.

page
String String String

The page name. Used to resolve endpoints. Optional. If null is provided, the current page route value will be used.

handler
String String String

The page handler name. Used to resolve endpoints. Optional.

values
Object Object Object

The route values. Optional. Used to resolve endpoints and expand parameters in the route template.

pathBase
Nullable<PathString>

An optional URI path base. Prepended to the path in the resulting URI. If not provided, the value of PathBase will be used.

fragment
FragmentString FragmentString FragmentString

A URI fragment. Optional. Appended to the resulting URI.

options
LinkOptions LinkOptions LinkOptions

An optional LinkOptions. Settings on provided object override the settings with matching names from RouteOptions.

Returns

A URI with an absolute path, or null if a URI cannot be created.

Applies to