ParseChildrenAttribute.IsDefaultAttribute メソッド
アセンブリ: System.Web (system.web.dll 内)

Dim instance As ParseChildrenAttribute Dim returnValue As Boolean returnValue = instance.IsDefaultAttribute
現在の ParseChildrenAttribute 値が既定値のインスタンスになる場合は true。それ以外の場合は false。


IsDefaultAttribute プロパティを照会する方法を次のコード例に示します。このコード例で使用されている 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) ' Verify attribute values. Dim p As ParseChildrenAttribute = _ Attribute.GetCustomAttribute(GetType(CollectionPropertyControl), _ GetType(ParseChildrenAttribute)) Dim sb As New StringBuilder() sb.Append("The DefaultProperty property is " & p.DefaultProperty.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"> <AspSample:Employee Name="Employee 1" Title="Title 1" Alias="Alias 1" /> <AspSample:Employee Name="Employee 2" Title="Title 2" Alias="Alias 2" /> </AspSample:CollectionPropertyControl> </div> </form> </body> </html>
<%@ Page Language="C#" Debug="true" %> <%@ 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) { // Verify attribute values. ParseChildrenAttribute p = (ParseChildrenAttribute)Attribute.GetCustomAttribute(typeof(CollectionPropertyControl) , typeof(ParseChildrenAttribute)); StringBuilder sb = new StringBuilder(); sb.Append("The DefaultProperty property is " + p.DefaultProperty.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"> <AspSample:Employee Name="Employee 1" Title="Title 1" Alias="Alias 1" /> <AspSample:Employee Name="Employee 2" Title="Title 2" Alias="Alias 2" /> </AspSample:CollectionPropertyControl> </div> </form> </body> </html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からParseChildrenAttribute.IsDefaultAttribute メソッドを検索する場合は、下記のリンクをクリックしてください。

- ParseChildrenAttribute.IsDefaultAttribute メソッドのページへのリンク