UrlBuilder.BuildUrl Metodo

Definizione

Crea un'interfaccia utente per creare o selezionare un URL.

Overload

Nome Descrizione
BuildUrl(IComponent, Control, String, String, String)

Crea un'interfaccia utente per creare o selezionare un URL.

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

Crea un'interfaccia utente per creare o selezionare un URL usando l'oggetto specificato UrlBuilderOptions .

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

Crea un'interfaccia utente per creare o selezionare un URL usando l'oggetto specificato UrlBuilderOptions .

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

Crea un'interfaccia utente per creare o selezionare un 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

Parametri

component
IComponent

Oggetto IComponent il cui sito deve essere utilizzato per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come elemento padre per la finestra di selezione.

initialUrl
String

URL iniziale da visualizzare nella finestra di selezione.

caption
String

Didascalia della finestra di selezione.

filter
String

Stringa di filtro da usare per filtrare facoltativamente i file visualizzati nella finestra di selezione.

Valori restituiti

URL restituito dall'interfaccia utente.

Esempio

Nell'esempio di codice seguente viene illustrato come usare il BuildUrl metodo per avviare un generatore di URL da un comando di menu in fase di progettazione.

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

Vedi anche

Si applica a

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

Crea un'interfaccia utente per creare o selezionare un URL usando l'oggetto specificato 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

Parametri

component
IComponent

Oggetto IComponent il cui sito deve essere utilizzato per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come elemento padre per la finestra di selezione.

initialUrl
String

URL iniziale da visualizzare nella finestra di selezione.

caption
String

Didascalia della finestra di selezione.

filter
String

Stringa di filtro da usare per filtrare facoltativamente i file visualizzati nella finestra di selezione.

options
UrlBuilderOptions

Oggetto UrlBuilderOptions che indica le opzioni per la selezione dell'URL.

Valori restituiti

URL restituito dall'interfaccia utente.

Esempio

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

Vedi anche

Si applica a

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

Crea un'interfaccia utente per creare o selezionare un URL usando l'oggetto specificato 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

Parametri

serviceProvider
IServiceProvider

Oggetto IServiceProvider da utilizzare per accedere ai servizi in fase di progettazione.

owner
Control

Oggetto Control utilizzato come elemento padre per la finestra di selezione.

initialUrl
String

URL iniziale da visualizzare nella finestra di selezione.

caption
String

Didascalia della finestra di selezione.

filter
String

Stringa di filtro da usare per filtrare facoltativamente i file visualizzati nella finestra di selezione.

options
UrlBuilderOptions

Oggetto UrlBuilderOptions che indica le opzioni per la selezione dell'URL.

Valori restituiti

URL restituito dall'interfaccia utente.

Commenti

L'interfaccia IServiceProvider viene usata per ottenere l'implementazione IDesignerHost per l'host della finestra di progettazione.

Vedi anche

Si applica a