CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 9/23/2007 9:04:11 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 38 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
Jazzcatone
Asp.Net User
Trying to create an Image Gallery within a Masterpage9/23/2007 9:04:11 AM

0/0

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>

 

 

 

 

 

 

KelseyThornton
Asp.Net User
Re: Trying to create an Image Gallery within a Masterpage9/23/2007 11:38:26 AM

0/0

Hi there.

I've not got exactly what you want here, but I *do* have a page where I've got a display rather like the "Filmstrip" dislpay in Windows XP.
Take a look at http://liberator.boldlygoingnowhere/Baronie/Fotos/FvanPoppel/FvanPoppel.aspx

If that's what you want, I can let you have my source.  (I am using Master Pages too! but I am using VB, not VC#)

My page uses a subdirectory full of images, with a matching subdirectory full of thumbnails.  In the fuillness of time, I want to use the GDI(?) program to create the thumbnails "on the fly" from the main pictures, but I'm not quite there yet!  You don't seem to have any thumbnails, so that won't be a problem!  Simply comment out the bits of code where this is used...

Changing from using a directory full of images to a database full of images isn't a big step - What I currently do is work my way down a list of files in a directory, adding them to a private class where I store the list, then I just cycle through them as requested by the user.  you can simply replace the directory list with the result from your DB query and bob's you're uncle...
Your message also suggests that you might want to start the filmstrip at any point in the list - This shouldn't be too difficult to achieve by simply setting the "current list item" to the array index you want.


Kelsey Thornton
(In the Netherlands)

Don't forget - Mark the post which answered your question with "Answer", then that user will get some kudos, and your post will be marked as "Answered" for future readers!
KelseyThornton
Asp.Net User
Re: Trying to create an Image Gallery within a Masterpage9/23/2007 11:49:04 AM

0/0

Just thought...

Another way you could approach this would be to have a modal dialog box pop up when the user clicks on a photo, then when he clicks on the image it would close the modal dialog, leaving the gallery still displayed no the page (behind the modal dialog).  Then the user could click on the next picture he wants :)

I also just happen to have an example of this on my site...
Look at http://liberator.boldlygoingnowhere.org/Baronie/Fotos/Fotos_Brigands05_2.aspx.

You could also probably make a kind of mish-mash of the two, but I've not tried that - You'd have to make your modal dialog also a .NET-aware file...

Hope some of this helps!

 


Kelsey Thornton
(In the Netherlands)

Don't forget - Mark the post which answered your question with "Answer", then that user will get some kudos, and your post will be marked as "Answered" for future readers!
Johnson2007
Asp.Net User
Re: Trying to create an Image Gallery within a Masterpage9/25/2007 7:21:25 AM

0/0

create a template column to the GridView, and place a hyperlink (named hyNext for example) into it. When the GridView is binding data. set the hyperlink's link like the following.

 

    protected void  grdJaneImages_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        HyperLink hyNext = (HyperLink)e.Row.FindControl("hyNext");
        hyNext.NavigateUrl = ((string)(int.Parse(Request.QueryString[""]) + 1)).ToString();
    }
 

Johnson
KelseyThornton
Asp.Net User
Re: Trying to create an Image Gallery within a Masterpage10/4/2007 7:39:01 PM

0/0

Johnson2007:

create a template column to the GridView, and place a hyperlink (named hyNext for example) into it. When the GridView is binding data. set the hyperlink's link like the following.

 

    protected void  grdJaneImages_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        HyperLink hyNext = (HyperLink)e.Row.FindControl("hyNext");
        hyNext.NavigateUrl = ((string)(int.Parse(Request.QueryString[""]) + 1)).ToString();
    }


This may well solve the question actually asked, but of course,  will *only* work if the file names are in the correct format...


Kelsey Thornton
(In the Netherlands)

Don't forget - Mark the post which answered your question with "Answer", then that user will get some kudos, and your post will be marked as "Answered" for future readers!
Jazzcatone
Asp.Net User
Re: Trying to create an Image Gallery within a Masterpage10/8/2007 5:33:31 AM

0/0

Hi and thank you for taking a moment. Visual Studio will not let me put a template column in a grid view. (Did you mean a TemplateField?) So when I put the Template Column outside the GridView  and add your codebehind you supplied I get the following error: Cannot convert type 'int' to 'string' Any suggestions on why this could be happening. I would appreciate any advice you could offer.

 Jason

 

6 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Create a site master page - SharePoint Server - Microsoft Office ... You can create a new master page from scratch by using a Windows SharePoint ... On the Master Page Gallery page, click the arrow next to New menu image ...
Sharepoint portalserver development SharePoint 2007 Picture ... Regarding on the custom master page, how did you create the custom .... I uploaded that into the master page gallery and have since made a ...
Developing a Custom Master Page (Master Pages and SharePoint part ... Oct 6, 2008 ... Create a new master page. The master page gallery is located in the _catalogs folder. Within the master page gallery you will find the ...
Branding SharePoint - Part 2: Creating the Design in SharePoint You have excellent control of where the master page is applied within your ... use the web interface to upload a master page to the Master Page Gallery much ...
popup calendar when using Masterpage i am using visual studio 2005 and I am trying to create a popup calender so when a user click on a image on the main form, a calender will ...
Finding all references where a master page, page layout, or other ... Then open up the Master Page Gallery. You'll notice a option in the toolbar: Show Related Resources. Select that item to create a split view. ...
how to create masterpages You create a Master Page by creating a file that ends with the .master extension . You can locate a Master Page file in any place within an ...
Safari Books Online - 9781590598092 - Microsoft SharePoint ... Whenever you create a new site in SharePoint, a master page named default.master is created for the site and stored in the Master Page Gallery. ...
p2p.wrox.com Forums - How to tie into controls on a MasterPage? In other words, if I have an about.aspx and a gallery.aspx page that both use the masterpage.master..how can I reference the buttons on the ...
Wikipedia:Galleries - Wikipedia, the free encyclopedia This is usually cited in this context as WP:NOT an image gallery, ... A single gallery section within an article should be titled Gallery. ...




Search This Site:










problem with stylesheet in theme folder

<center> and style position absolute - changing window sizes??

problem with vertical filler

trouble with getting a themeless page

how can i use a link with the master page....

how to enable menu item using javascript

trying to style a treeview

design problems-master pages,css

trying to convert a basepage class from 1.1 to asp.net 2.0 and master pages -- please help

skin for custom web control

how retrieve the textbox id in master pages using javascript

menu control error caused by parent panel resize

easiest/recommended navigation menu control/solution that works with safari

cant apply style to page

master page reuse

treeview in frame won't expand

alternative to frameset

masterpage conflicts problem!

how to activate my javascript in a content page

menu horizantal

how to save data that checked checkbox into database

apprelativevirtualpath = "~/default.aspx" not recognised

skins for gridview control

treeview and javascript

themes and stylesheets and overriding thereof

treeview?

problems with updating a treeview.

problem with pages associated to a masterpage

pass in value to master pages from aspx pages?

defaultbutton with masterpages

  Privacy | Contact Us
All Times Are GMT