Page view counter

Problem with creating Thumbnail Image within the Datalist?

Last post 06-07-2006 7:28 AM by savvy. 1 replies.

Sort Posts:

  • Problem with creating Thumbnail Image within the Datalist?

    06-07-2006, 6:00 AM
    • Loading...
    • savvy
    • Joined on 05-16-2005, 9:35 AM
    • London
    • Posts 220
    • Points 763

    I want to create a Thumbnail Image from a given large Image  and bind it to the Datalist with the datasource being Database. I followed this link given below

    Creating Thumbnail Images on the fly with ASP.Net
    http://west-wind.com/weblog/posts/283.aspx

    according to link given, if we change the parameters of this link we can resize the image
    http://www.west-wind.com/wwStore/demos/CreateThumbnail.aspx?image=images/WebStoreLogo_big.jpg&size=400
    So, I created CreateThumbnail.aspx which has the same code and if i use the link as
    http://localhost/myproject/CreateThumbnail.aspx?image=images/WebStoreLogo_big.jpg&size=400 which is working fine.
    But I tried something like this within my datalist keeping the size as a constant value in the Createthumbnail.aspx , and its not working
    <ItemTemplate>
    <img alt='<%# Eval("ProdTitle") %>' src='CreateThumbNail.aspx?image=<%#  Eval("Prodimgpath") %>' style="border: 0">
    </ItemTemplate>
    Is this the right way of doing this?

    Thanks in advance for your help and time
     

    Savvy
  • Re: Problem with creating Thumbnail Image within the Datalist?

    06-07-2006, 7:28 AM
    • Loading...
    • savvy
    • Joined on 05-16-2005, 9:35 AM
    • London
    • Posts 220
    • Points 763

    I got it working. Everything is working fine if I just change my <img> tag to

    <

    img alt='<%# Eval("ProdTitle") %>' src='CreateThumbNail.aspx?image=images/collections/<%# Eval("Prodimgpath") %>' style="border: 0">

    The problem was with the path of the images. Its good to know that we can even display the image through a .aspx page.

    Savvy
Page 1 of 1 (2 items)