Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Sign In| Join
Last post Jun 07, 2006 11:28 AM by savvy
Participant
769 Points
229 Posts
Jun 07, 2006 10:00 AM|LINK
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
Jun 07, 2006 11:28 AM|LINK
I got it working. Everything is working fine if I just change my <img> tag to
<
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
Participant
769 Points
229 Posts
Problem with creating Thumbnail Image within the Datalist?
Jun 07, 2006 10:00 AM|LINK
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
Participant
769 Points
229 Posts
Re: Problem with creating Thumbnail Image within the Datalist?
Jun 07, 2006 11:28 AM|LINK
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.