Try our conversational search powered by Generative AI!

Class VirtualPathArguments

Used as argument in for example GetUrl(ContentReference, String, VirtualPathArguments) to create an outgoing url.

Inheritance
System.Object
VirtualPathArguments
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7
Syntax
public class VirtualPathArguments

Constructors

VirtualPathArguments()

Initializes a new instance of the VirtualPathArguments class.

Declaration
public VirtualPathArguments()

Properties

Action

Gets or sets the action method that should be linked to.

Declaration
public string Action { get; set; }
Property Value
Type Description
System.String

ContextMode

Gets or sets the mode for the links.

Declaration
public ContextMode ContextMode { get; set; }
Property Value
Type Description
ContextMode
Remarks

If not explicitly set it will use current ContextMode

ForceAbsolute

Gets or sets a value indicating whether the absolute URL should be returned

Declaration
public bool ForceAbsolute { get; set; }
Property Value
Type Description
System.Boolean
Remarks

If set to true the returned value will always be an absolute URL; otherwise it will depend on the current context. The default value is false.

ForceCanonical

Gets or sets a value indicating whether the canonical URL should be returned if there are multiple hostnames defined for the site.

Declaration
public bool ForceCanonical { get; set; }
Property Value
Type Description
System.Boolean
Remarks

If not set explicitly, the hostname of the resolved URL will be dependent on the current context. If the resolved content is on a different site than the current, the canonical URL will always be returned. If the content is on the same site, the canonical URL will only be returned if the current hostname is set to be redirected.

RequestContext

Gets or sets the request context.

Declaration
public RequestContext RequestContext { get; set; }
Property Value
Type Description
System.Web.Routing.RequestContext
Remarks

If not explicitly a new instance of RequestContext will be created.

RouteValues

Gets or sets the route values.

Declaration
public RouteValueDictionary RouteValues { get; set; }
Property Value
Type Description
System.Web.Routing.RouteValueDictionary
Remarks

If not explicitly a new instance of System.Web.Routing.RouteValueDictionary will be created.

ValidateTemplate

Gets or sets a value indicating whether there should be a validation that checks if the IContent type has a template. If the type has no template and ValidateTemplate is true, the UrlResolver will return null as the URL.

Declaration
public bool ValidateTemplate { get; set; }
Property Value
Type Description
System.Boolean
Remarks

The default value is true.

To get Url for a ContentFolder (which has no template) set ValidateTemplate = false.

Methods

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.Object.GetHashCode()

Extension Methods