Results 1 to 4 of 4

Thread: Create Image on the Fly and use in the TableCell's background-image

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    5

    Create Image on the Fly and use in the TableCell's background-image

    Hi All.

    In the past when I needed to set the ImageUrl property of the Image Web control, I could create another page where I would create/get an image dynamically and the response write it with a MemoryStream object to the page: something like this:

    <asp:Image ImageUrl="myAspPageWithImageProcessing.aspx" runat="server"></asp:Image>

    Now I want to do a similar task, the only difference is I need to assign an image to the background of the TableCell something like this (in the code behind):

    td.Style["background-image"] = "myAspPageWithImageProcessing.aspx";

    but this doesn't work.

    Has anyone else ever needed to achieve this ?


    Thank you

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    you're missing the url attribute....

    td.Style["background-image"] = "url(myAspPageWithImageProcessing.aspx)";

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    5
    Thanks for the reply nemaroller, but I already tried using the URL too and it still wouldnt show the image.

  4. #4

    Thread Starter
    New Member
    Join Date
    Aug 2004
    Posts
    5
    Never mind, I am an idiot, it DOES work, thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width