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, UrlBuilderOptions)

使用指定的 UrlBuilderOptions 对象创建用于创建或选取 URL 的 UI。

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

创建用于创建或选取 URL 的 UI。

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

使用指定的 UrlBuilderOptions 对象创建用于创建或选取 URL 的 UI。

Equals(Object)

确定指定的对象是否等于当前对象。

(继承自 Object)
GetHashCode()

用作默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
MemberwiseClone()

创建当前 Object的浅表副本。

(继承自 Object)
ToString()

返回一个表示当前对象的字符串。

(继承自 Object)

适用于

另请参阅