Sdílet prostřednictvím


UrlBuilder.BuildUrl Metoda

Definice

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy URL.

Přetížení

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

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy URL.

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

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy URL pomocí zadaného UrlBuilderOptions objektu.

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

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy URL pomocí zadaného UrlBuilderOptions objektu.

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

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy 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

Parametry

component
IComponent

Web IComponent , jehož web má být použit pro přístup ke službám návrhu.

owner
Control

Slouží Control jako nadřazený objekt pro okno výběru.

initialUrl
String

Počáteční adresa URL, která se má zobrazit v okně pro výběr.

caption
String

Titulek okna pro výběr.

filter
String

Řetězec filtru, který se má použít k volitelnému filtrování souborů zobrazených v okně pro výběr.

Návraty

Adresa URL vrácená z uživatelského rozhraní

Příklady

Následující příklad kódu ukazuje, jak použít metodu BuildUrl ke spuštění tvůrce adresy URL z příkazu nabídky v době návrhu.

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

Viz také

Platí pro

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

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy URL pomocí zadaného UrlBuilderOptions objektu.

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

Parametry

component
IComponent

Web IComponent , jehož web má být použit pro přístup ke službám návrhu.

owner
Control

Slouží Control jako nadřazený objekt pro okno výběru.

initialUrl
String

Počáteční adresa URL, která se má zobrazit v okně pro výběr.

caption
String

Titulek okna pro výběr.

filter
String

Řetězec filtru, který se má použít k volitelnému filtrování souborů zobrazených v okně pro výběr.

options
UrlBuilderOptions

A UrlBuilderOptions označující možnosti pro výběr adresy URL.

Návraty

Adresa URL vrácená z uživatelského rozhraní

Příklady

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

Viz také

Platí pro

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

Vytvoří uživatelské rozhraní pro vytvoření nebo výběr adresy URL pomocí zadaného UrlBuilderOptions objektu.

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

Parametry

serviceProvider
IServiceProvider

Použije IServiceProvider se pro přístup ke službám v době návrhu.

owner
Control

Slouží Control jako nadřazený objekt pro okno výběru.

initialUrl
String

Počáteční adresa URL, která se má zobrazit v okně pro výběr.

caption
String

Titulek okna pro výběr.

filter
String

Řetězec filtru, který se má použít k volitelnému filtrování souborů zobrazených v okně pro výběr.

options
UrlBuilderOptions

A UrlBuilderOptions označující možnosti pro výběr adresy URL.

Návraty

Adresa URL vrácená z uživatelského rozhraní

Poznámky

Rozhraní IServiceProvider slouží k získání IDesignerHost implementace pro hostitele návrháře.

Viz také

Platí pro