UrlBuilder.BuildUrl Méthode

Définition

Crée une interface utilisateur pour créer ou choisir une URL.

Surcharges

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

Crée une interface utilisateur pour créer ou choisir une URL.

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

Crée une interface utilisateur pour créer ou choisir une URL, à l'aide de l'objet UrlBuilderOptions spécifié.

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

Crée une interface utilisateur pour créer ou choisir une URL, à l'aide de l'objet UrlBuilderOptions spécifié.

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

Crée une interface utilisateur pour créer ou choisir une 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

Paramètres

component
IComponent

IComponent dont le site donne accès aux services de design.

owner
Control

Control utilisé en tant que parent de la fenêtre du sélecteur.

initialUrl
String

URL initiale à afficher dans la fenêtre du sélecteur.

caption
String

Légende de la fenêtre du sélecteur.

filter
String

Chaîne de filtrage utilisée pour filtrer éventuellement les fichiers affichés dans la fenêtre du sélecteur.

Retours

URL retournée à partir de l'interface utilisateur.

Exemples

L’exemple de code suivant montre comment utiliser la BuildUrl méthode pour lancer un générateur d’URL à partir d’une commande de menu au moment du design.

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

Voir aussi

S’applique à

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

Crée une interface utilisateur pour créer ou choisir une URL, à l'aide de l'objet UrlBuilderOptions spécifié.

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

Paramètres

component
IComponent

IComponent dont le site donne accès aux services de design.

owner
Control

Control utilisé en tant que parent de la fenêtre du sélecteur.

initialUrl
String

URL initiale à afficher dans la fenêtre du sélecteur.

caption
String

Légende de la fenêtre du sélecteur.

filter
String

Chaîne de filtrage utilisée pour filtrer éventuellement les fichiers affichés dans la fenêtre du sélecteur.

options
UrlBuilderOptions

UrlBuilderOptions indiquant les options pour la sélection d'URL.

Retours

URL retournée à partir de l'interface utilisateur.

Exemples

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

Voir aussi

S’applique à

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

Crée une interface utilisateur pour créer ou choisir une URL, à l'aide de l'objet UrlBuilderOptions spécifié.

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

Paramètres

serviceProvider
IServiceProvider

IServiceProvider à utiliser pour accéder aux services au moment du design.

owner
Control

Control utilisé en tant que parent de la fenêtre du sélecteur.

initialUrl
String

URL initiale à afficher dans la fenêtre du sélecteur.

caption
String

Légende de la fenêtre du sélecteur.

filter
String

Chaîne de filtrage utilisée pour filtrer éventuellement les fichiers affichés dans la fenêtre du sélecteur.

options
UrlBuilderOptions

UrlBuilderOptions indiquant les options pour la sélection d'URL.

Retours

URL retournée à partir de l'interface utilisateur.

Remarques

L’interface IServiceProvider est utilisée pour obtenir l’implémentation IDesignerHost de l’hôte du concepteur.

Voir aussi

S’applique à