ParseChildrenAttribute.ChildControlType プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ParseChildrenAttribute.ChildControlType プロパティの意味・解説 

ParseChildrenAttribute.ChildControlType プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

可能なコントロール タイプを示す値を取得します

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

Dim instance As ParseChildrenAttribute
Dim value As Type

value = instance.ChildControlType
public Type ChildControlType { get; }
public:
property Type^ ChildControlType {
    Type^ get ();
}
/** @property */
public Type get_ChildControlType ()
public function get ChildControlType
 () : Type

プロパティ
コントロールタイプ既定値は System.Web.UI.Control です。

解説解説
使用例使用例

ChildControlType プロパティ照会する方法次のコード例示します。このコード例使用されている CollectionPropertyControl クラスEmployee クラスの定義については、「ParseChildrenAttribute」を参照してください

<%@ Page Language="VB" %>
<%@ Register TagPrefix="AspSample" Assembly="Samples.AspNet.VB.Controls"
 Namespace="Samples.AspNet.VB.Controls"
 %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">
  
  Protected Sub Page_Load(ByVal
 sender As Object, ByVal
 e As System.EventArgs)
    
    ' Create a new employee object and add it to custom control.
    Dim e1 As New Employee("Employee
 2", "Title 2", "Alias
 2")
    CollectionPropertyControl1.Employees.Add(e1)

    ' Verify attribute values.
    Dim p As ParseChildrenAttribute = _
    Attribute.GetCustomAttribute(GetType(CollectionPropertyControl),
 _
    GetType(ParseChildrenAttribute))

    Dim sb As New StringBuilder()
    sb.Append("The ChildControlType property is "
 & p.ChildControlType.ToString() & "<br>")
    sb.Append("The ChildrenAsProperties property is "
 & p.ChildrenAsProperties.ToString() & "<br>")
    sb.Append("The IsDefaultAttribute method returns "
 & p.IsDefaultAttribute().ToString())
    Message.Text = sb.ToString()

  End Sub
</script>

<html  >
<head id="Head1" runat="server">
    <title>PersistChildrenAttribute</title>
</head>
<body>
    <form id="Form1" runat="server">
    <div>
      <asp:Label ID="Message"
                 runat="server"/>
      <AspSample:CollectionPropertyControl id="CollectionPropertyControl1"
 
                                           runat="server">
      <Employees>
        <AspSample:Employee Name="Employee 1" 
                            Title="Title 1" 
                            Alias="Alias 1"
 />
      </Employees>
      </AspSample:CollectionPropertyControl>
    </div>
    </form>
</body>
</html>
<%@ Page Language="C#" %>
<%@ Register TagPrefix="AspSample" Assembly="Samples.AspNet.CS.Controls"
 Namespace="Samples.AspNet.CS.Controls" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

  protected void Page_Load(object sender, EventArgs
 e)
  {
    // Create a new employee object and add it to the custom control.
    Employee e1 = new Employee("Employee 2", "Title
 2", "Alias 2");
    CollectionPropertyControl1.Employees.Add(e1);

    // Verify attribute values.
    ParseChildrenAttribute p = 
      (ParseChildrenAttribute)Attribute.GetCustomAttribute(typeof(CollectionPropertyControl)
,
      typeof(ParseChildrenAttribute));

    StringBuilder sb = new StringBuilder();
    sb.Append("The ChildControlType property is " + p.ChildControlType.ToString()
 + "<br>");
    sb.Append("The ChildrenAsProperties property is " + p.ChildrenAsProperties.ToString()
 + "<br>");
    sb.Append("The IsDefaultAttribute method returns " + p.IsDefaultAttribute().ToString());
    Message.Text = sb.ToString();

  }
</script>

<html  >
<head runat="server">
    <title>ParseChildrenAttribute Example</title>
</head>
<body>
    <form runat="server">
    <div>
      <asp:Label ID="Message"
                 runat="server"/>
      <AspSample:CollectionPropertyControl id="CollectionPropertyControl1"
 
                                           runat="server">
      <Employees>
        <AspSample:Employee Name="Employee 1" 
                            Title="Title 1" 
                            Alias="Alias 1" />
      </Employees>
      </AspSample:CollectionPropertyControl>    
    </div>
    </form>
</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ParseChildrenAttribute クラス
ParseChildrenAttribute メンバ
System.Web.UI 名前空間
Control クラス


このページでは「.NET Framework クラス ライブラリ リファレンス」からParseChildrenAttribute.ChildControlType プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からParseChildrenAttribute.ChildControlType プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からParseChildrenAttribute.ChildControlType プロパティ を検索

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

辞書ショートカット

すべての辞書の索引

「ParseChildrenAttribute.ChildControlType プロパティ」の関連用語

ParseChildrenAttribute.ChildControlType プロパティのお隣キーワード
検索ランキング

   

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



ParseChildrenAttribute.ChildControlType プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS