Click or drag to resize
UrlResolverResolveUrl Method
Resolves an application relative URL to the absolute form. Uses page context by default.

Namespace: CMS.Base.Web.UI
Assembly: CMS.Base.Web.UI (in CMS.Base.Web.UI.dll) Version: 12.0.0
Syntax
C#
public static string ResolveUrl(
	string url,
	bool usePage = true,
	bool ensurePrefix = false
)

Parameters

url
Type: SystemString
Virtual application root relative URL
usePage (Optional)
Type: SystemBoolean
If true, the page object can be used to resolve URLs
ensurePrefix (Optional)
Type: SystemBoolean
If true, the current URL prefix is ensured for the URL

Return Value

Type: String
Absolute URL
Remarks
Use ResolveUrl(String, Boolean) if the URL is not relative.
See Also