This documentation is archived and is not being maintained.

UrlBuilder::BuildUrl Method (IComponent, Control, String, String, String)

Creates a UI to create or pick a URL.

Namespace:  System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

public:
static String^ BuildUrl(
	IComponent^ component, 
	Control^ owner, 
	String^ initialUrl, 
	String^ caption, 
	String^ filter
)

Parameters

component
Type: System.ComponentModel::IComponent

The IComponent whose site is to be used to access design-time services.

owner
Type: System.Windows.Forms::Control

The System.Windows.Forms::Control used as the parent for the picker window.

initialUrl
Type: System::String

The initial URL to be shown in the picker window.

caption
Type: System::String

The caption of the picker window.

filter
Type: System::String

The filter string to use to optionally filter the files displayed in the picker window.

Return Value

Type: System::String
The URL returned from the UI.

The following code example shows how to use the BuildUrl method to launch a URL builder from a menu command at design time.

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

// Launch the Url Builder using the specified control 
// parent, initial URL, empty relative base URL path, 
// window caption, filter String* and URLBuilderOptions value.
UrlBuilder::BuildUrl( this->Component, c, "http://www.example.com", "Select a URL", "", UrlBuilderOptions::None );

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0, 1.1, 1.0
Show: