locked
Image problem after postback using cachedimageservice.axd RRS feed

  • Question

  • User1076633440 posted

    Hi Everyone,

    Good day! I am having troulble with Dynamic image loaded from memory. I have a datagrid with images. The images comes from the database. The process is under the page_load event inside a checking if not page.ispostback. The images do show on the first load and property "src" has a value of "cachedimageservice.axd?data=key" . Now when the page postback due to a seperate event  the images in the datagrid are gone and I notice when i view the source code the "src" property is blank.

    I could re bind the datagrid but that will be ineffecient. Is there any work around for this issue?

    Friday, December 19, 2008 1:59 AM

Answers

  • User-1136466523 posted

    Hi,

    From your descriptoin, the fact is that you have to re-bind your image controls and assign the src attributes. Generally you can add a method which specially for assigning the src attribute. At the pageload event, you can call this method inside a checking if not page.ispostback. And then, in other event handler, you can call that method explicitly to make sure that all images' src attributes should be assigned.

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 21, 2008 9:09 AM

All replies

  • User-1136466523 posted

    Hi,

    From your descriptoin, the fact is that you have to re-bind your image controls and assign the src attributes. Generally you can add a method which specially for assigning the src attribute. At the pageload event, you can call this method inside a checking if not page.ispostback. And then, in other event handler, you can call that method explicitly to make sure that all images' src attributes should be assigned.

    Thanks.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 21, 2008 9:09 AM
  • User1076633440 posted

    Hi,

    Thanks for your reply. So it is a bug and my only option is rebind the grid?

    Regards

    Tuesday, January 6, 2009 6:17 PM