ערוך

שתף באמצעות


UrlBuilder.BuildUrl Method

Definition

Creates a UI to create or pick a URL.

Overloads

BuildUrl(IComponent, Control, String, String, String)

Creates a UI to create or pick a URL.

BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions)

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

BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions)

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

BuildUrl(IComponent, Control, String, String, String)

Creates a UI to create or pick a URL.

public:
 static System::String ^ BuildUrl(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Control ^ owner, System::String ^ initialUrl, System::String ^ caption, System::String ^ filter);
public static string BuildUrl (System.ComponentModel.IComponent component, System.Windows.Forms.Control owner, string initialUrl, string caption, string filter);
static member BuildUrl : System.ComponentModel.IComponent * System.Windows.Forms.Control * string * string * string -> string
Public Shared Function BuildUrl (component As IComponent, owner As Control, initialUrl As String, caption As String, filter As String) As String

Parameters

component
IComponent

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

owner
Control

The Control used as the parent for the picker window.

initialUrl
String

The initial URL to be shown in the picker window.

caption
String

The caption of the picker window.

filter
String

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

Returns

The URL returned from the UI.

Examples

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 );
// 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);                      
}
' This method handles the "Launch Url Builder UI" menu command.
' Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
Private Sub launchUrlBuilder(ByVal sender As Object, ByVal e As EventArgs)
    ' Create a parent control.
    Dim c As 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( _
        Me.Component, _
        c, _
        "http://www.example.com", _
        "Select a URL", _
        "", _
        UrlBuilderOptions.None)
End Sub

See also

Applies to

BuildUrl(IComponent, Control, String, String, String, UrlBuilderOptions)

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

public:
 static System::String ^ BuildUrl(System::ComponentModel::IComponent ^ component, System::Windows::Forms::Control ^ owner, System::String ^ initialUrl, System::String ^ caption, System::String ^ filter, System::Web::UI::Design::UrlBuilderOptions options);
public static string BuildUrl (System.ComponentModel.IComponent component, System.Windows.Forms.Control owner, string initialUrl, string caption, string filter, System.Web.UI.Design.UrlBuilderOptions options);
static member BuildUrl : System.ComponentModel.IComponent * System.Windows.Forms.Control * string * string * string * System.Web.UI.Design.UrlBuilderOptions -> string
Public Shared Function BuildUrl (component As IComponent, owner As Control, initialUrl As String, caption As String, filter As String, options As UrlBuilderOptions) As String

Parameters

component
IComponent

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

owner
Control

The Control used as the parent for the picker window.

initialUrl
String

The initial URL to be shown in the picker window.

caption
String

The caption of the picker window.

filter
String

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

options
UrlBuilderOptions

A UrlBuilderOptions indicating the options for URL selection.

Returns

The URL returned from the UI.

Examples

// 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 );
// 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);                      
}
' This method handles the "Launch Url Builder UI" menu command.
' Invokes the BuildUrl method of the System.Web.UI.Design.UrlBuilder.
Private Sub launchUrlBuilder(ByVal sender As Object, ByVal e As EventArgs)
    ' Create a parent control.
    Dim c As 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( _
        Me.Component, _
        c, _
        "http://www.example.com", _
        "Select a URL", _
        "", _
        UrlBuilderOptions.None)
End Sub

See also

Applies to

BuildUrl(IServiceProvider, Control, String, String, String, UrlBuilderOptions)

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

public:
 static System::String ^ BuildUrl(IServiceProvider ^ serviceProvider, System::Windows::Forms::Control ^ owner, System::String ^ initialUrl, System::String ^ caption, System::String ^ filter, System::Web::UI::Design::UrlBuilderOptions options);
public static string BuildUrl (IServiceProvider serviceProvider, System.Windows.Forms.Control owner, string initialUrl, string caption, string filter, System.Web.UI.Design.UrlBuilderOptions options);
static member BuildUrl : IServiceProvider * System.Windows.Forms.Control * string * string * string * System.Web.UI.Design.UrlBuilderOptions -> string
Public Shared Function BuildUrl (serviceProvider As IServiceProvider, owner As Control, initialUrl As String, caption As String, filter As String, options As UrlBuilderOptions) As String

Parameters

serviceProvider
IServiceProvider

The IServiceProvider to be used to access design-time services.

owner
Control

The Control used as the parent for the picker window.

initialUrl
String

The initial URL to be shown in the picker window.

caption
String

The caption of the picker window.

filter
String

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

options
UrlBuilderOptions

A UrlBuilderOptions indicating the options for URL selection.

Returns

The URL returned from the UI.

Remarks

The IServiceProvider interface is used to obtain the IDesignerHost implementation for the designer host.

See also

Applies to