HtmlSelectBuilder.GetChildControlType メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlSelectBuilder.GetChildControlType メソッドの意味・解説 

HtmlSelectBuilder.GetChildControlType メソッド

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

HtmlSelect コントロールの子コントロールType取得します

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

Public Overrides Function
 GetChildControlType ( _
    tagName As String, _
    attribs As IDictionary _
) As Type
Dim instance As HtmlSelectBuilder
Dim tagName As String
Dim attribs As IDictionary
Dim returnValue As Type

returnValue = instance.GetChildControlType(tagName, attribs)
public override Type GetChildControlType (
    string tagName,
    IDictionary attribs
)
public:
virtual Type^ GetChildControlType (
    String^ tagName, 
    IDictionary^ attribs
) override
public Type GetChildControlType (
    String tagName, 
    IDictionary attribs
)
public override function GetChildControlType
 (
    tagName : String, 
    attribs : IDictionary
) : Type

パラメータ

tagName

コントロールタグ名。

attribs

コントロール格納されている属性配列

戻り値
HtmlSelect コントロール指定したコントロールType

解説解説
使用例使用例

GetChildControlType メソッドオーバーライドして、カスタムの子コントロールの型を確認する方法次のコード例示します作業用の完全なコード例については、HtmlSelectBuilder クラス概要トピック参照してください

<AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)>
 _
Public Overrides Function
 GetChildControlType(ByVal tagName As String,
 ByVal attribs As IDictionary) As Type

    ' Distinguish between two possible types of child controls.
    If tagName.ToLower().EndsWith("myoption1")
 Then
        Return GetType(MyOption1)
    ElseIf tagName.ToLower().EndsWith("myoption2")
 Then
        Return GetType(MyOption2)
    End If
    Return Nothing

End Function 
[AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
public override Type GetChildControlType(string
 tagName, IDictionary attribs)
{
    // Distinguish between two possible types of child controls.
    if (tagName.ToLower().EndsWith("myoption1"))
    {
        return typeof(MyOption1);
    }
    else if (tagName.ToLower().EndsWith("myoption2"))
    {
        return typeof(MyOption2);
    }
    return null;
}
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlSelectBuilder クラス
HtmlSelectBuilder メンバ
System.Web.UI.HtmlControls 名前空間
HtmlSelect クラス



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

HtmlSelectBuilder.GetChildControlType メソッドのお隣キーワード
検索ランキング

   

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



HtmlSelectBuilder.GetChildControlType メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS