locked
Accessing "ImageID" on details.aspx page RRS feed

  • Question

  • User-1160112130 posted

    Hi,

    I have setup the PWS as my personal site and got it working pretty well. At this point I am making changes and additions.

    I am currently trying to add comment functionality to the photos in the different albums much like on Facebook for example. I have written all the middle tier logic to do this and created the required tables in the database however I am stuck when it comes to obtaining the "ImageID" which I need in order to pull up the comments for a given image in an album. If you take a look at my site:

    www.trevorkeast.com

    You will see that the individual images are displayed in a paginated fashon allowing users to click though all the images in a given album. This is standard PWS functionality. However, when I look at the code associated with this page (details.aspx) I cannot seem to gain access to the "ImageID" for the image being currently displayed...

    Any input would be most helpful!

    Many thanks,

    Trevor Keast

    Wednesday, September 2, 2009 3:49 PM

All replies

  • User1825610765 posted

     The image is being rendered by an HttpHandler. I looked at your page and viewed source to see how the HTML looked for an image:

    <img src="Handler.ashx?MediaID=61&Size=L"

    Here it is invoking the handler to render the image with a MediaID of 61. I'd have to look at the code behind to see how to access the image, but I'd bet you have the image id, 61 in this case, somewhere in the codebehind to build this url for the IMG tag.

     

    Wednesday, September 2, 2009 5:50 PM