Class VirtualPathDataExtensions
Contains extension methods that are useful when working with System.Web.Routing.VirtualPathData.
Inheritance
Inherited Members
Namespace: EPiServer.Web.Routing
Assembly: EPiServer.Cms.AspNet.dll
Version: 11.20.7Syntax
public static class VirtualPathDataExtensions
Methods
GetUrl(VirtualPathData)
Returns a URL from the routing information stored in the virtual path data.
Declaration
public static string GetUrl(this VirtualPathData virtualPathData)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.VirtualPathData | virtualPathData | The VirtualPathData instance this method extends. |
Returns
Type | Description |
---|---|
System.String | A string containing the URL. |
Remarks
You should use this method instead of the System.Web.Routing.VirtualPathData.VirtualPath property as it will take multiple site configuration (CMS enterprise sites) into consideration.
GetUrl(VirtualPathData, Boolean)
Returns a URL from the routing information stored in the virtual path data.
Declaration
public static string GetUrl(this VirtualPathData virtualPathData, bool multiSiteSupport)
Parameters
Type | Name | Description |
---|---|---|
System.Web.Routing.VirtualPathData | virtualPathData | The VirtualPathData instance this method extends. |
System.Boolean | multiSiteSupport | If value is true then will the host for the site be added in case the virtual path is to another site than current http request (or if no http context is available). |
Returns
Type | Description |
---|---|
System.String | A string containing the relative path. |