遍历Attributes
protected void Button4_Click(object sender, EventArgs e)
{
AttributeCollection ac = Button2.Attributes;
IEnumerator key = ac.Keys.GetEnumerator();
if (key != null)
while(key.MoveNext())
{
Response.Write(string.Format("{0}=\"{1}\"<br>", key.Current, ac[key.Current.ToString()].ToString()));
}
}