AttributeCollection.Count Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets the number of attributes in the AttributeCollection object.

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

public int Count { get; }

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);

.NET Framework
Available since 1.1
Return to top