set background image on a table cell in codebehind

Posted on 2006-04-07
Last Modified: 2008-02-01
I want to set the background image of a table cell. i have an html table and I am using the runat=server.
 CType(tblMain.FindControl("tdSecondWeek"), HtmlTableCell).BgColor = "white"

the above works to set the bgcolor but I want to set a background image and then toggle between two different images. to give the appearance of active tabs like on this website.

please help


Question by:jcook32
    1 Comment
    LVL 17

    Accepted Solution

    CType(tblMain.FindControl("tdSecondWeek"), HtmlTableCell).background = "file.gif"

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video discusses moving either the default database or any database to a new volume.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now