asadsiddiqui
Apr 14th, 2005, 03:20 AM
hello, i'm working on greeting card website i want to show the greeting cards thumbnails dynmically,i uploaded the origional images of cards now i want to show them as a thumbnail on my page i have diffrent category of cards for example a category like (Friendship cards) there are 10 cards on this category so when user click on this link next page must show the thumbnails of the orgional cards i have created the loging but it only shows 1 thumbnail on the page so pls tell me how can i handle it, thanks.
following in my code.
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ import Namespace= "System.IO" %>
<%@ Import Namespace= "System.Drawing.imaging" %>
<script language="VB" runat="server">
Sub page_Load(Sender as object, e as EventArgs)
Const d as string="im/"
Dim s as string,html as string
Dim fullsizeimg as system.Drawing.Image
Dim dummyCallBack as System.Drawing.Image.GetThumbnailImageAbort
dummyCallBack=New system.drawing.image.GetThumbnailimageabort(AddressOf ThumbnailCallback)
Dim thumbnailimg as System.Drawing.Image
for each s in Directory.GetFiles(server.Mappath(d),"*.gif")
fullsizeimg=System.Drawing.Image.FromFile(s)
thumbnailimg=fullsizeimg.GetthumbnailImage(100,100,dummyCallBack,IntPtr.Zero)
thumbnailimg.Save(Response.OutputStream, ImageFormat.gif)
Next (s)
End sub
Function ThumbnailCallback() as Boolean
return False
end function
</script>
following in my code.
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ import Namespace= "System.IO" %>
<%@ Import Namespace= "System.Drawing.imaging" %>
<script language="VB" runat="server">
Sub page_Load(Sender as object, e as EventArgs)
Const d as string="im/"
Dim s as string,html as string
Dim fullsizeimg as system.Drawing.Image
Dim dummyCallBack as System.Drawing.Image.GetThumbnailImageAbort
dummyCallBack=New system.drawing.image.GetThumbnailimageabort(AddressOf ThumbnailCallback)
Dim thumbnailimg as System.Drawing.Image
for each s in Directory.GetFiles(server.Mappath(d),"*.gif")
fullsizeimg=System.Drawing.Image.FromFile(s)
thumbnailimg=fullsizeimg.GetthumbnailImage(100,100,dummyCallBack,IntPtr.Zero)
thumbnailimg.Save(Response.OutputStream, ImageFormat.gif)
Next (s)
End sub
Function ThumbnailCallback() as Boolean
return False
end function
</script>