This documentation is archived and is not being maintained.

IWebFormsBuilderUIService.BuildUrl Method

Launches an editor to build a URL property.

[Visual Basic]
Function BuildUrl( _
   ByVal owner As Control, _
   ByVal initialUrl As String, _
   ByVal baseUrl As String, _
   ByVal caption As String, _
   ByVal filter As String, _
   ByVal options As UrlBuilderOptions _
) As String
[C#]
string BuildUrl(
   Control owner,
 string initialUrl,
 string baseUrl,
 string caption,
 string filter,
 UrlBuilderOptions options
);
[C++]
String* BuildUrl(
   Control* owner,
 String* initialUrl,
 String* baseUrl,
 String* caption,
 String* filter,
 UrlBuilderOptions options
);
[JScript]
function BuildUrl(
   owner : Control,
 initialUrl : String,
 baseUrl : String,
 caption : String,
 filter : String,
 options : UrlBuilderOptions
) : String;

Parameters

owner
The control used to parent the dialog shown by the UrlBuilder.
initialUrl
The initial URL to display in the selection interface.
baseUrl
The base URL used to construct relative URLs.
caption
A caption that presents a message in the selection interface.
filter
The filter string to use to optionally filter the files displayed in the selection interface.
options
A UrlBuilderOptions that indicates the options for the UrlBuilder.

Return Value

A string that contains the URL returned by the UrlBuilder.

Example

[Visual Basic] 
' Obtain an instance of an IWebFormsBuilderUIService.
Dim builderService As IWebFormsBuilderUIService = _
CType(Me.Component.Site.GetService(GetType(IWebFormsBuilderUIService)), _
    IWebFormsBuilderUIService)

' Return from method if the service was not obtained.            
If builderService Is Nothing Then
    Return
End If

' Create a parent control.
Dim c As New System.Windows.Forms.Control()
c.CreateControl()

' Start the URL builder using the specified control
' parent, initial URL, empty relative base URL path,
' window caption, empty filter string and URLBuilderOptions value.
builderService.BuildUrl(c, "http://www.example.com", "", _
    "Select a URL", "", UrlBuilderOptions.None)

[C#] 
// Obtain an instance of an IWebFormsBuilderUIService.
IWebFormsBuilderUIService builderService =                  (IWebFormsBuilderUIService)this.Component.Site.GetService(
     typeof(IWebFormsBuilderUIService));

// Return from method if service was not obtained.            
if( builderService == null )
    return;

// Create a parent control.
System.Windows.Forms.Control c = new System.Windows.Forms.Control();            
c.CreateControl();            

// Start the URL builder using the specified control
// parent, initial URL, empty relative base URL path,
// window caption, empty filter string and URLBuilderOptions value.
builderService.BuildUrl(c, "http://www.example.com", "", 
    "Select a URL", "", UrlBuilderOptions.None);

[C++] 
// Obtain an instance of an IWebFormsBuilderUIService.
IWebFormsBuilderUIService* builderService =
   dynamic_cast<IWebFormsBuilderUIService*>(this->Component->Site->GetService(__typeof(IWebFormsBuilderUIService)));

// Return from method if service was not obtained.
if (builderService == 0)
   return;

// Create a parent control.
System::Windows::Forms::Control* c = new System::Windows::Forms::Control();
c->CreateControl();

// Start the URL builder using the specified control
// parent, initial URL, empty relative base URL path,
// window caption, empty filter string and URLBuilderOptions value.
builderService->BuildUrl(c, S"http://www.example.com", S"",
   S"Select a URL", S"", UrlBuilderOptions::None);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

IWebFormsBuilderUIService Interface | IWebFormsBuilderUIService Members | System.Web.UI.Design Namespace

Show: