wtbonnell Posted November 11, 2003 Posted November 11, 2003 I am using VB.NET, and I have a table with a background image = "image.jpeg" Depending on the date, I would like to dynamically change this image. For example, during Christmas, I would want the background image to = "christmasImage.jpeg" I understand the table has to runat="server" but I am confused as to what the code in the code behind would like because in my Visual Studio .NET application does not have a background property within the table. Therefore, I do not know how to reach the table background property to change it. Do I need a style sheet, if so what would the code look like in the code behind? Thanks... ex: If (Month(Today()) = 12) Then 'Set Christmas image as background image of table --- need guidance here! End If Quote
*Gurus* Derek Stone Posted November 11, 2003 *Gurus* Posted November 11, 2003 <table id="table1" runat="server"> <tr> <td>Foobar</td> </tr> </table> table1.Style("background-image") = "url(image.jpg)" Quote Posting Guidelines
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.