UrlBuilder.BuildUrl Method (IComponent, Control, String, String, String, UrlBuilderOptions)

 

Creates a UI to create or pick a URL, using the specified UrlBuilderOptions object.

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,
	UrlBuilderOptions options
)

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.

options
Type: System.Web.UI.Design.UrlBuilderOptions

A UrlBuilderOptions indicating the options for URL selection.

Return Value

Type: System.String

The URL returned from the UI.

// This method handles the "Launch Url Builder UI" menu command.
// Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
private void launchUrlBuilder(object sender, EventArgs e)
{
    // Create a parent control.
    System.Windows.Forms.Control c = new 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);                      
}        

.NET Framework
Available since 1.1
Return to top
Show: