Used for so-called "relative URL rewriting" where URL rewriting rules have a variable "{PageName}" which is replaced by the caller's page name using this method.
The "~/" section at the beginning is replaced with the absolute path of the calling page, so each rule can function regardless of the page depth and location in the portal hierarchy.
Caller URL is passed as a parameter.
Namespace: MonoSoftware.MonoX.UtilitiesAssembly: MonoX (in MonoX.dll) Version: 5.1.40.5065 (5.1.40.5065)
Syntax
C# |
---|
public static string RewritePagePath(
string urlToRewrite,
string callerUrl
) |
Visual Basic |
---|
Public Shared Function RewritePagePath (
urlToRewrite As String,
callerUrl As String
) As String |
Visual C++ |
---|
public:
static String^ RewritePagePath(
String^ urlToRewrite,
String^ callerUrl
) |
F# |
---|
static member RewritePagePath :
urlToRewrite : string *
callerUrl : string -> string
|
Return Value
Type:
StringRewritten URL.
See Also