AttributeCollection.Count Property

 

Gets the number of attributes in the AttributeCollection object.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

Public ReadOnly Property Count As Integer

Property Value

Type: System.Int32

The number of items in the collection.

The following example shows how to use the Count property to write the number of attributes on a control to the containing page.

         Response.Write("Attribute Collection count before PostBack = " & _
myAttributeCollection.Count.ToString())

.NET Framework
Available since 1.1
Return to top
Show: