Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2007, 04:06 AM
Authorized User
 
Join Date: Jul 2005
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to Create Image Gallery

Hi and thanks for taking a moment. I am trying to create an image gallery within a masterpage. My first page, called momsgallery.aspx has a series of thumbnail images that when clicked directs the user to a new page ( called momimage.aspx) and it passes a querystring value. The momimage.aspx shows the full image and at that time the address contains the querystring passed. (ex momimage.aspx?id=6)

I am using a Gridview on the momimage.aspx with an imagefield inside it. The Gridview uses an SQLDatasource to retrieve the image path and displays the image. Simple enough...see below.

Now I want to give the user the ability to navigate to the next image without returning to the momsgallery.aspx page. What I need to do is find some way to increment the querystring value so the page reloads and displays the next image. Is there a good/simple way to do this? I know I can do this sort of idea with photoshop by having it crank out a gallery, but that would mean I have to ditch my masterpage model. Any advice or help on how to create a hyperlink or button to do this would be greatly appreciated.

Jason

<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="momimage.aspx.cs" Inherits="momimage" Title="Untitled Page" %>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" Runat="Server">

<table align="center">

<tr>

<td>

<asp:GridView ID="grdJaneImages" DataSourceID="SqlDataSource41" runat="Server" BorderWidth="0" AutoGenerateColumns="False">

<Columns>

<asp:ImageField DataImageUrlField="path" ShowHeader="False" ItemStyle-HorizontalAlign="Center" >

</asp:ImageField>

</Columns>

</asp:GridView>



</td>

</tr>

<tr>

<td><asp:HyperLink runat=server NavigateUrl="~/momimage.aspx?id=@id+1">click here</asp:HyperLink></td>

</tr>





</table>





<asp:SqlDataSource ID="SqlDataSource41" runat="server" ConnectionString="<%$ ConnectionStrings:BeatlesConnectionString %>"

SelectCommand="SELECT [path] FROM [janeimages] WHERE ([id] = @id)">

<SelectParameters>

<asp:QueryStringParameter DefaultValue="0" Name="id" QueryStringField="id" Type="Int32" />

</SelectParameters>

</asp:SqlDataSource>
















Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
How to create a video gallery CurvyBabe C# 0 November 15th, 2006 06:17 AM
Gallery Image display in popup Window caitydev ASP.NET 1.0 and 1.1 Basics 3 April 3rd, 2006 10:23 AM
Image Gallery Help morpheus Javascript How-To 3 February 20th, 2006 07:45 PM
JavaScript Image Gallery welshboy2005 Javascript How-To 0 May 20th, 2005 04:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.