There are 1 entries for the tag ASP.NET 2.0

Dynamically change Body Background-image!

What if you need to dynamically change the Body Background-image based on whether the Page IsPostback? You have a CSS Stylesheet for the page, and that Stylesheet has a background-image defined for the body tag. So what is the [workaround]? You first must define the body tag on the page as a server control. Then you can access the body control via code in your page: 1: protected void Page_Load(object sender, EventArgs e) 2: { 3: if (!IsPostBack) 4: { 5: var rnd = new Random(); 6: // the background ......

Posted On Sunday, December 13, 2009 5:11 PM | Comments (0)

Copyright © intermark

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski