BGColor

  • Thread starter Thread starter Joseph Bittman MVP MCSD
  • Start date Start date
J

Joseph Bittman MVP MCSD

December 18, 2005

lol Another item that doesn't seem right... BGColor? I want to change the
back color of the web form at runtime, but it appears that bccolor is a
member of the Body element (not located under Me) and therefore I can't find
a way to manipulate it at runtime? Thanks!

--

Joseph Bittman
Microsoft Certified Solution Developer
Microsoft Most Valuable Professional -- DPM

Blog/Web Site: http://71.39.42.23/
 
Joseph Bittman MVP MCSD said:
lol Another item that doesn't seem right... BGColor? I want to change the
back color of the web form at runtime, but it appears that bccolor is a
member of the Body element (not located under Me) and therefore I can't
find a way to manipulate it at runtime?

I am not very familiar with ASP.NET, but I would use a client-side script
for this purpose (JScript, VBScript, JavaScript, ...):

\\\
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>...</title>
<script type="text/vbscript" language="vbscript">
Sub Button1_Click()
window.document.body.bgColor = "#FF0000"
End Sub
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button
ID="Button1"
runat="server"
Text="Button"
OnClientClick="jscript:Button1_Click();"
/>
</form>
</body>
</html>
///
 
Back
Top