Returns a fully qualified absolute server Url which includes the protocol, server and port in addition to the server relative Url.

Namespace: MonoSoftware.Web
Assembly: MonoSoftware.Web (in MonoSoftware.Web.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public static string ResolveServerUrl(
	this Page page,
	string serverUrl
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ResolveServerUrl ( 
	page As Page,
	serverUrl As String
) As String
Visual C++
public:
[ExtensionAttribute]
static String^ ResolveServerUrl(
	Page^ page, 
	String^ serverUrl
)
F#
static member ResolveServerUrl : 
        page : Page * 
        serverUrl : string -> string 

Parameters

page
Type: System.Web.UI..::..Page
serverUrl
Type: System..::..String

Return Value

Type: String
A fully qualified absolute server Url

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Page. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Works like Control.ResolveUrl including support for ~ syntax but returns an absolute URL. This method is useful for generating Urls for AJAX methods.

See Also