UrlBuilder.BuildUrl Método

Definición

Crea una interfaz de usuario para crear o seleccionar una dirección URL.

Sobrecargas

Nombre Description
BuildUrl(IComponent, Control, String, String, String)

Crea una interfaz de usuario para crear o seleccionar una dirección URL.

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

Crea una interfaz de usuario para crear o elegir una dirección URL mediante el objeto especificado UrlBuilderOptions .

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

Crea una interfaz de usuario para crear o elegir una dirección URL mediante el objeto especificado UrlBuilderOptions .

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

Crea una interfaz de usuario para crear o seleccionar una dirección 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

Parámetros

component
IComponent

IComponent cuyo sitio se va a usar para acceder a los servicios en tiempo de diseño.

owner
Control

que Control se usa como elemento primario para la ventana del selector.

initialUrl
String

Dirección URL inicial que se va a mostrar en la ventana del selector.

caption
String

Título de la ventana del selector.

filter
String

Cadena de filtro que se va a usar para filtrar opcionalmente los archivos mostrados en la ventana del selector.

Devoluciones

Dirección URL devuelta desde la interfaz de usuario.

Ejemplos

En el ejemplo de código siguiente se muestra cómo usar el BuildUrl método para iniciar un generador de direcciones URL desde un comando de menú en tiempo de diseño.

// 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

Consulte también

Se aplica a

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

Crea una interfaz de usuario para crear o elegir una dirección URL mediante el objeto especificado UrlBuilderOptions .

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

Parámetros

component
IComponent

IComponent cuyo sitio se va a usar para acceder a los servicios en tiempo de diseño.

owner
Control

que Control se usa como elemento primario para la ventana del selector.

initialUrl
String

Dirección URL inicial que se va a mostrar en la ventana del selector.

caption
String

Título de la ventana del selector.

filter
String

Cadena de filtro que se va a usar para filtrar opcionalmente los archivos mostrados en la ventana del selector.

options
UrlBuilderOptions

que UrlBuilderOptions indica las opciones de selección de direcciones URL.

Devoluciones

Dirección URL devuelta desde la interfaz de usuario.

Ejemplos

// 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

Consulte también

Se aplica a

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

Crea una interfaz de usuario para crear o elegir una dirección URL mediante el objeto especificado UrlBuilderOptions .

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

Parámetros

serviceProvider
IServiceProvider

IServiceProvider que se va a usar para acceder a los servicios en tiempo de diseño.

owner
Control

que Control se usa como elemento primario para la ventana del selector.

initialUrl
String

Dirección URL inicial que se va a mostrar en la ventana del selector.

caption
String

Título de la ventana del selector.

filter
String

Cadena de filtro que se va a usar para filtrar opcionalmente los archivos mostrados en la ventana del selector.

options
UrlBuilderOptions

que UrlBuilderOptions indica las opciones de selección de direcciones URL.

Devoluciones

Dirección URL devuelta desde la interfaz de usuario.

Comentarios

La IServiceProvider interfaz se usa para obtener la IDesignerHost implementación del host del diseñador.

Consulte también

Se aplica a