How to do an image pop-up from a dynamic page
Hello,
I'm new to ASP.NET, and I've been puzzling over how to accomplish a certain task.
1. Almost any large catalog website - say, LLBean or Lands End -- has a template product page that pulls up product picture, text, and prices from a database. Most of these sites allow you to see a large pop-up photograph of, say, a hiking **************** when you click on the small image on the product page.
2. A small image on a webpage that pops-up into a larger-sized window when clicked is pretty common, and not difficult to do with an image that is static, or "hard coded" into a page.
3. What I don't understand is how to do a click-and-pop-up window not from a hard-coded image, but from one that has been pulled down - "dynamically" - from a database onto an .aspx page. I have several ASP.NET books, and not one explains how to do this.
So, for example, a "productdetail.aspx" page will have have empty containers in which to pour data about the specific product being brought up from the database: product description, the price "$17.99", and a URL to the product photograph. The picture container on teh page I am working on looks like this:
<asp:Image ID="Image3" ImageUrl='<%#DataBinder.Eval(Container.DataItem, "small_image")%>' AlternateText='View Details' Runat="server" width="100">
</asp:Image>
Since there is no product image attached to the actual "productdetail.aspx" webpage, how would a pop-up window 'know' which image it is pulling up for its detail view when it is clicked?
Any advice and help appreciated!
|