ConnectionStringEditorとは? わかりやすく解説

ConnectionStringEditor クラス

メモ : このクラスは、.NET Framework version 2.0 で新しく追加されたものです。

デザイン時に接続文字列プロパティを選択および編集するためのユーザー インターフェイスの基本クラスを提供します。

名前空間: System.Web.UI.Design
アセンブリ: System.Design (system.design.dll 内)
構文構文

Public Class ConnectionStringEditor
    Inherits UITypeEditor
Dim instance As ConnectionStringEditor
public class ConnectionStringEditor : UITypeEditor
public ref class ConnectionStringEditor : public
 UITypeEditor
public class ConnectionStringEditor extends
 UITypeEditor
public class ConnectionStringEditor extends
 UITypeEditor
解説解説
使用例使用例

カスタム コントロールに格納されたプロパティで ConnectionStringEditor クラスのインスタンスにアクセスする方法を次のコード例に示します。デザイン サーフェイスでコントロールのプロパティを編集する場合、ConnectionStringEditor クラスは、プロパティ値の接続文字列を選択および編集するためのユーザー インターフェイスを提供します。

' Define a custom class derived from the SqlDataSource Web control.
 
Public Class SqlDataSourceWithBackup
    Inherits SqlDataSource

    Private _alternateConnectionString As String

    ' Define an alternate connection string, which could be used
    ' as a fallback value if the primary connection string fails.

    ' The EditorAttribute indicates the property can
    ' be edited at design-time with the ConnectionStringEditor class.
    <DefaultValue(""), _
     EditorAttribute(GetType(System.Web.UI.Design.ConnectionStringEditor),
 _
         GetType(System.Drawing.Design.UITypeEditor)), _
     Category("Data"), _
     Description("The alternate connection string.")>
 _
   Public Property AlternateConnectionString()
 As String

        Get
            Return _alternateConnectionString
        End Get
        Set(ByVal value As
 String)
            _alternateConnectionString = value
        End Set
    End Property

End Class
// Define a custom class derived from the SqlDataSource Web control.
 
public class SqlDataSourceWithBackup : SqlDataSource
{
    private string _alternateConnectionString;

    // Define an alternate connection string, which could be used
    // as a fallback value if the primary connection string fails.
    
    // The EditorAttribute indicates the property can
    // be edited at design-time with the ConnectionStringEditor class.
    [
      DefaultValue(""),
      EditorAttribute(typeof(System.Web.UI.Design.ConnectionStringEditor),
                     typeof(System.Drawing.Design.UITypeEditor)),
      Category("Data"),
      Description("The alternate connection string.")
    ]
    public string AlternateConnectionString
    {
        get
        {
            return _alternateConnectionString;
        }
        set
        {
            _alternateConnectionString = value;
        }

    }
    
}
.NET Framework のセキュリティ.NET Framework のセキュリティ
継承階層継承階層
System.Object
   System.Drawing.Design.UITypeEditor
    System.Web.UI.Design.ConnectionStringEditor
       System.Web.UI.Design.WebControls.SqlDataSourceConnectionStringEditor
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ConnectionStringEditor メンバ
System.Web.UI.Design 名前空間
UITypeEditor
ConnectionStringsExpressionEditor
SqlDataSource
SqlDataSourceDesigner
EditorAttribute
その他の技術情報
接続文字列の使用

ConnectionStringEditor コンストラクタ


ConnectionStringEditor プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ IsDropDownResizable  ユーザーがドロップダウン エディタのサイズを変更できるかどうかを示す値を取得します。 ( UITypeEditor から継承されます。)
参照参照

関連項目

ConnectionStringEditor クラス
System.Web.UI.Design 名前空間
UITypeEditor
ConnectionStringsExpressionEditor
SqlDataSource
SqlDataSourceDesigner
EditorAttribute

その他の技術情報

接続文字列の使用

ConnectionStringEditor メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド EditValue オーバーロードされます。 GetEditStyle メソッドで提供されたエディタ スタイルを使用して、指定したオブジェクトの値を編集します。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。)
パブリック メソッド GetEditStyle オーバーロードされます。 接続文字列エディタで使用されている編集スタイルを取得します。
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。)
パブリック メソッド GetPaintValueSupported  オーバーロードされます。 エディタでオブジェクトの値の視覚的な表現を描画できるかどうかを示します。 ( UITypeEditor から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 ( Object から継承されます。)
パブリック メソッド PaintValue  オーバーロードされます。 オブジェクトの値の視覚的な表現を描画します。 ( UITypeEditor から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ConnectionStringEditor クラス
System.Web.UI.Design 名前空間
UITypeEditor
ConnectionStringsExpressionEditor
SqlDataSource
SqlDataSourceDesigner
EditorAttribute

その他の技術情報

接続文字列の使用

ConnectionStringEditor メンバ

デザイン時に接続文字列プロパティを選択および編集するためのユーザー インターフェイスの基本クラスを提供します。

ConnectionStringEditor データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ConnectionStringEditor ConnectionStringEditor クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ IsDropDownResizable  ユーザーがドロップダウン エディタのサイズを変更できるかどうかを示す値を取得します。(UITypeEditor から継承されます。)
パブリック メソッドパブリック メソッド
( プロテクト メソッド も参照)
  名前 説明
パブリック メソッド EditValue オーバーロードされます。 GetEditStyle メソッドで提供されたエディタ スタイルを使用して、指定したオブジェクトの値を編集します。
パブリック メソッド Equals  オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。)
パブリック メソッド GetEditStyle オーバーロードされます。 接続文字列エディタで使用されている編集スタイルを取得します。
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。)
パブリック メソッド GetPaintValueSupported  オーバーロードされます。 エディタでオブジェクトの値の視覚的な表現を描画できるかどうかを示します。 (UITypeEditor から継承されます。)
パブリック メソッド GetType  現在のインスタンスの Type を取得します。 (Object から継承されます。)
パブリック メソッド PaintValue  オーバーロードされます。 オブジェクトの値の視覚的な表現を描画します。 (UITypeEditor から継承されます。)
パブリック メソッド ReferenceEquals  指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String を返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ConnectionStringEditor クラス
System.Web.UI.Design 名前空間
UITypeEditor
ConnectionStringsExpressionEditor
SqlDataSource
SqlDataSourceDesigner
EditorAttribute

その他の技術情報

接続文字列の使用



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「ConnectionStringEditor」の関連用語

ConnectionStringEditorのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ConnectionStringEditorのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS