Well, you can get an enumerator on Keys and iterate through. This sample is
from MSDN:
<html>
<script language="C#" runat="server">
void Page_Load(Object Src, EventArgs e) {
Message.InnerHtml += "<h5>The Text Box's CssStyleCollection
contains:</h5>";
IEnumerator keys = MyText.Style.Keys.GetEnumerator();
while (keys.MoveNext()) {
String key = (String)keys.Current;
Message.InnerHtml += key + "=" + MyText.Style[key] + "<br>";
}
}
</script>
<body>
<span id="Message" MaintainState="false" runat="server" />
<p>
<b>Enter some text:</b> <br>
<input id="MyText" type="text" value="Type a value here."
style="font: 14pt verdana;width:300;" runat="server"/>
</body>
</html>
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"John Spiegel" <js******@YETANOTHERSPAMHATERc-comld.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi all,
How can I read through the style attributes for a server control? It
would
be so convenient if one could reference an index, something like:
pnlPageHeader.Style.Keys["Top"].ToString();
TIA,
John