| <span style="font: 12pt verdana; color:orange;font-weight:700" runat="server"> This is some literal text inside a styled span control</span> <p><font face="verdana"><h4>Styled Button</h4></font><p> <button style="font: 8pt verdana;background-color:lightgreen;border-color:black;width:100" runat="server">Click me!</button> |
| <style> .spanstyle { font: 12pt verdana; font-weight:700; color:orange; } .buttonstyle { font: 8pt verdana; background-color:lightgreen; border-color:black; width:100 } …… </style> <span class="spanstyle" runat="server"> This is some literal text inside a styled span control </span> <p><font face="verdana"><h4>Styled Button</h4></font><p> <button class="buttonstyle" runat="server">Click me!</button> |
| <script language="VB" runat="server" > Sub Page_Load(Sender As Object, E As EventArgs) MyText.Style("width") = "90px" Response.Write(MyText.Style("width")) End Sub </script> <input type="text" id="MyText" runat="server"/> |
| <script language="VB" runat="server"> Sub Page_Load(Src As Object, E As EventArgs) Message.InnerHtml &= "<h5>Accessing Styles...</h5>" Message.InnerHtml &= "The color of the span is: " & MySpan.Style("color") & "<br>" Message.InnerHtml &= "The width of the textbox is: " & MyText.Style("width") & "<p>" Message.InnerHtml &= "MySelect's style collection is: <br><br>" Dim Keys As IEnumerator Keys = MySelect.Style.Keys.GetEnumerator() Do While (Keys.MoveNext()) Dim Key As String Key = CStr(Keys.Current) Message.InnerHtml &= "<li> " Message.InnerHtml &= Key & "=" & MySelect.Style(Key) & "<br>" Loop End Sub Sub Submit_Click(Src As Object, E As EventArgs) Message.InnerHtml &= "<h5>Modifying Styles...</h5>" MySpan.Style("color") = ColorSelect.Value MyText.Style("width") = "600" Message.InnerHtml &= "The color of the span is: " & MySpan.Style("color") & "<br>" Message.InnerHtml &= "The width of the textbox is: " & MyText.Style("width") End Sub </script> |

