[RESOLVED] Picture Swapping
I'm working on this website for this company that will allow them to book meetings for there conference rooms. On this site I have a details page that allows the users to see all the details of the room. I have multiple pictures of the room on this page and have it displaying as one large picture and the rest are smaller and set up like tabs. What I want to happen is, when a user clicks on one the smaller pictures it will swap places with the big one. I have the smaller pics as imagebuttons to get the click event. Any help, tips, or links would be greatly appreciated.
imgprop.src = imgpath;
Then the image link
<img src="img/defaultimage.gif" name="imgprop" vspace="2" id="imgprop">
Change defaultimage.gif with the image you want displayed when the page first loads
Finally the links to change the image
Is there a way to do it in .NET with the code behind?
Does anyone know a way to do this in asp.net (vb) 1.1. The way I have this set up is one main image and four smaller image buttons. When I click any of the image buttons, it should switch with the main image. All the image urls are taken out of a database. The code I have will only swap once, so I end up losing a pic. I will post the code I have right now.
All help will be appreciated.
Private Sub Image1_Click(ByVal sender As System.Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles Image1.Click
Dim large As String
Dim small As String
large = imgLarge.ImageUrl '''main image
small = Image1.ImageUrl '''image button one
If Page.IsPostBack Then
If Image1.ImageUrl = large Then
Image1.ImageUrl = small
imgLarge.ImageUrl = large
Image1.ImageUrl = large
imgLarge.ImageUrl = small
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)