Ive created a realestate application that allows the agent to upload photos along with a description of the estate, price, bedrooms and financial options. On the buyers side ive used a forms view to enable a viewer to browse through records and display images directly from the database.
Everything seems to be working fine but what id really like to do is have the ability to click on a thumbnail version of the images in order to display a much larger image in either a seperate window or table.
How can this be acomplished? Can I use client-side javascript or visual basic programming on the server side? Please help. Ive displayed my code below:

<asp:SqlDataSource ID="names" runat="server" ProviderName="System.Data.SqlClient"
ConnectionString="<%$ConnectionStrings:Monday %>" SelectCommand="SELECT person_image1, person_image2, person_image3 From people" />

<asp:FormView ID="FormView" runat="server" DataSourceID="names" AllowPaging="true">
<asp:ImageButton id="thumb" runat="server" Height="150" Width="200" ImageUrl='<%# Eval("person_image1") %>'
<asp:ImageButton id="thumb" runat="server" Height="150" Width="200" ImageUrl='<%# Eval("person_image2") %>'
<asp:ImageButton id="thumb" runat="server" Height="150" Width="200" ImageUrl='<%# Eval("person_image3") %>'/>

8 Years
Discussion Span
Last Post by dickersonka

Its built into .net
This is C# but same thing

//put your image path here
string imgPath = "";
System.Drawing.Image img = Image.FromFile(imgPath);

Image thumbnail = img.GetThumbnailImage(64, 64, new System.Drawing.Image.GetThumbnailImageAbort(ThumbnailCallback), IntPtr.Zero);

You must add the callback, but its not used.


Thank you for your interest but my images are stored as a file with the url stored in a database. How can I apply this code or any other code to my existing asp.net markup.
I am very new to asp and i apreciate your help please elaborate do that i can solve this issue.

This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.