Problem with creating Thumbnail Image within the Datalist?

S

savvy

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/de...px?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>
Can anyone help me out where i'm going wrong
Thanks in advance for your help and time
 
S

savvy

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top