共用方式為


UrlBuilder 類別

定義

啟動 URL 編輯器以允許使用者選取或建立 URL。 此類別無法獲得繼承。

public ref class UrlBuilder sealed
public sealed class UrlBuilder
type UrlBuilder = class
Public NotInheritable Class UrlBuilder
繼承
UrlBuilder

範例

下列程式碼範例示範如何使用 BuildUrl 方法,在設計階段從功能表命令啟動 URL 產生器。

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

備註

方法 BuildUrl 會啟動使用者介面來選取 URL。

方法

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

建立 UI,以建立或挑選 URL。

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

使用指定的 UrlBuilderOptions 物件,建立 UI 以建立或選取 URL。

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

使用指定的 UrlBuilderOptions 物件,建立 UI 以建立或選取 URL。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱