VS 2012 - Repeater / Paging And Image Gallery

Apr 30, 2013

This is my situation:

I use prettyPhoto to display images from database. The images are displayed in a Repeater control with paging enabled, and with page size set to 3.

Everything works fine, the gallery loads up, I can go through pictures. But, prettyPhoto loads only 3 pictures at a time. So if I get 12 pictures from the database, I get 4 pages. So every time I have to view pictures from Page1, close the gallery, click the Next button that displays Page2 and so on.

I understand that this is happening because I set the PageSize to 3. I'm not sure how to "tell" prettyPhoto that there are actually more photos.

This is how I bind the Repeater to the datasource:

vb.net Code:

Dim Pds1 as New PagedDataSource()Pds1.DataSource = dsPictures.Tables(0).DefaultViewPds1.AllowPaging = TruePds1.CurrentPageIndex = CurrentPage Repeater3.DataSource = Pds1Repeater3.DataBind

This is the HTML for the page that uses the Repeater and gallery:

vb.net Code:

<a href = '<%#DataBinder.Eval(Container, "DataItem.newsPictureURL")%>' rel="prettyPhoto[Repeater3]" title = '<%#DataBinder.Eval(Container, "DataItem.newsPictureCaption")%><img id="icons" src = '<%#DataBinder.Eval(Container, "DataItem.newsPictureLocation")%>' alt = '<%#DataBinder.Eval(Container, "DataItem.newsPictureDesc")%>' />

As you can see, I use rel="prettyPhoto[Repeater3]" where Repeater3 is the name of the gallery, or DataSource.

I know it is hard to figure out anything with out inspecting the prettyPhoto source (jQuery).

View 1 Replies


Similar Messages:

Retrieve The Image From Image Gallery Theninsert It And Store In Image Gallery

Apr 28, 2010

i want to retrieve the image from image gallery. and then i want to insert it and store in image gallery.

View 2 Replies

Web Forms :: Zoom (Enlarge Image) On MouseOver In ListView Image Gallery?

Feb 17, 2013

[URL]

used the css and html from the above sample code  , but instead of the actual image i get loader image

i am using datalist to display image 

<asp:ListView ID="ListView1" runat="server">
<LayoutTemplate>
<ul class="ProductList">
<asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>

[Code].....

View 1 Replies

Web Forms :: Display Thumbnail Image In DataList Image Gallery And OnClick Display Original Image

Oct 12, 2012

I need to develop image gallery

Image saved in Folder called Images and image Name , Description saved in Database Table Images.

On Deafault.aspx

Thubnail images should display with out any change in Quality i.e by DataList Control

On Click of Thubnail images Fullview of image with width and height same as image width and height   
Next, Previous, Close Buttons on Popup window

View 1 Replies

VS 2012 - Loading Images Into Repeater Control

Aug 19, 2013

I'm creating a simple CMS for a fairly simple web page. I'm currently working on a part for displaying news on the main page.

The controls I have on the page:

- a GridView control with enabled pagging and a SELECT button,
- an Image control for displaying news cover picture,
- CKeditor control for editing news text,
- Repeater control for displaying pictures from database

How does it all work?

In Page_load I have the following:

vb.net Code:
connectionString = "Data Source=KORISNIK-PCSQLEXPRESS;Initial Catalog=****;
User ID=**;Password=****"        conn = New SqlConnection(connectionString)       
If conn.State = ConnectionState.Closed Or conn.State = ConnectionState.Broken Then             
Try                conn.Open()                If Not IsPostBack Then                    bindGrid()                   

[Code] ...

As you can see, I load the GridView control with news from DB. At this moment all other control are disabled. User has to SELECT the row he wants to edit, and click the MODIFY button.

This is what happens when user clicks the MODIFY button:

vb.net Code:
Private Function selectForEdit()        dsSelectForEdit = New DataSet       
captionPicture.ImageUrl = ""         enableCommands()       
Dim sqlQuery As String        
sqlQuery = "SELECT news.newsCaption, news.newsIntro, news.newsCoverPicture, news.newsStatus,

[Code] ....

Basically, I select newsDetails based on newsID. Also, this is where I take the coverPicture from the database using a generic handler.

This is the code for showImage.ashx:

vb.net Code:
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest        
Dim newsID As Int32        If Not context.Request.QueryString("newsID") Is Nothing Then           
newsID = Convert.ToInt32(context.Request.QueryString("newsID"))        Else           
Throw New ArgumentException("No parameter specified")        End If        

[Code] ....

This part works fine, as the picture is correctly displayed in the Image control. Now, I also want to load the pictures that are related to the selected news. So, I use this function:

vb.net Code:
Private Function selectNewsPictures()        dsSelectPicturesForEdit = New DataSet         enableCommands()       
Dim sqlQuery As String         sqlQuery = "SELECT newsDetailsPictureID,newsDetailsPicture,newsDetailsPictureCaption,newsDetailsPictureDescription FROM newsDetailsPictures WHERE newsID = @newsIDEditing"          myCommand = New SqlCommand(sqlQuery, conn)         myCommand.Parameters.Add("@newsIDEditing", SqlDbType.Int, 250)       

[Code] ....

You can see that I take pictureID's and store them into a List (of integer). That way I can use those integers in showNewsPictures.ashx to display all the pictures.

showNewsPictures.ashx:

vb.net Code:
Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest        
Dim newsID As Int32        If Not context.Request.QueryString("pictureID") Is Nothing Then           
newsID = Convert.ToInt32(context.Request.QueryString("pictureID"))        Else           
Throw New ArgumentException("No parameter specified")        End If        

[Code] ....

The picture ID's are being sent through pictureRepeater_ItemDataBound:

vb.net Code:
Private Sub pictureRepeater_ItemDataBound(sender As Object, e As RepeaterItemEventArgs)
Handles pictureRepeater.ItemDataBound        
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then            
Dim ctrl As New Image            ctrl = e.Item.FindControl("pictureHolder")           
ctrl.Width = 100            ctrl.Height = 100              ctrl.ImageUrl = "~/showNewsPictures.ashx?pictureID=" &
listOfIDs.Item(itemIndex)            itemIndex = itemIndex + 1         End If    End Sub

THE PROBLEM:

I load the page, select the news, click the MODIFY button and all works well. The news details are loaded, the cover picture is loaded, the repeater pictures are loaded.

I click the cancel button (clears all the commands and disables them) and I get an error saying the DataReader needs to be closed.And I never use one This happens either in showNewsPictures.ashx or showImage.ashx.

In some other scenario, this happens right after I click the MODIFY button.

View 1 Replies

Forms Data Controls :: Repeater Paging - Retrieve Hyperlink Variable Inside Repeater?

Jul 12, 2010

I have repeater in which I have 2 hyperlink in the footer of the repeater and I want that the hyperlink can navigate from the page_load

View 2 Replies

How To Make Image Gallery

May 20, 2010

make image gallary in asp .net 2.0?

my code is here

Imports System

View 8 Replies

How To Create Image Gallery Like That Of Google

Sep 30, 2010

how to create image gallery like that of google.

View 4 Replies

How To Display New Image Gallery Like Facebook

Feb 21, 2011

How to display New image gallery like we see in facebook with comments.

View 1 Replies

Web Forms :: Image Gallery By Category?

Jan 25, 2013

I want to make Image Gallery for products By Category

for example clothes, books,...

I want doing it with the two links

Image-Gallery-using-ASP.Net-DataList-Control-Part-I
Image-Gallery-using-ASP.Net-DataList-Control-Part-II

without Category it works fine

but I changed this line 

FROM tbl_product ) AS tbl WHERE Row >= '
to
FROM tbl_product ) AS tbl WHERE cat_id=@cat_id Row >= '
andI added

[Code]....

and now I face this messageProcedure or function spx_Pager has too many arguments specified.

View 1 Replies

Web Forms :: Develop Image Gallery For Each Album

May 16, 2012

I want to develop a image gallery for each album.then if i add one image description also added with image .

View 1 Replies

Web Forms :: Create Album Image Gallery

Oct 26, 2013

I want to create Image Gallery as like facebook having different category of  album photos. Like if anybody given the album name xyz so after clicking on xyz or on the image of xyz the images inside that should be opened. In this way i want to create Image gallery using albums. 

View 1 Replies

Forms Data Controls :: Display Image Gallery In .Net?

Nov 23, 2010

Display image gallery in .Net

View 2 Replies

VS 2010 Image Gallery - Adding Previous And Next Button

Jun 30, 2012

I know a little bit of vb.net but don't know all that much about the asp.net technology. I do some volunteer work for a non profit organization and what I'm trying to do is integrate an image gallery into their site, instead of using an external image service that they use now.

After some searching I found an easy to use program that automatically creates the necessary thumbnails in a table.

However I want to add some functionality; when a user clicks an image for full size I want to add the option to click a button or link, to get to the next image.

I've done a lot of searching but couldn't find how to achieve this. I guess I need to find out the current image and then somehow jump to the next image.

How to implement this. Preferably I'm looking for something that is easy to implement. I'll have a number of different albums with a different amount of images. If possible I'd like to avoid having to rename the images so that they are photo1, photo2 etc.

Currently the image gallery looks like this : [URL] ....

I'm pretty sure I will need to make some changes to the viewimage.aspx file. Currently it only contains:

vb Code:
<img border="0" src="<%=Request.QueryString("img")%>" alt="" />

Not sure if you need to know the code that does the thumbnailing + creating clickable thumbnails, but I'll post it just in case it's needed

vb Code:
<script language="c#" runat="server"> void Page_Load(Object sender, EventArgs e){   
// Modify these numbers for the thumbnail size you want    const int maxWidth  = 200;    const int maxHeight = 200;       
ArrayList pics = new ArrayList();    string html;    int imgHeight;    int imgWidth;    foreach(string s in Directory.GetFiles(Server.MapPath(""), "*.jpg")){      System.Drawing.Image currentImage = System.Drawing.Image.FromFile(s);     

[Code] ....

I got the code from here: [URL] ....

but the contact button doesn't work, otherwise I would have contacted the original author.

View 3 Replies

Web Forms :: Image Views Counter In Website Gallery

Apr 27, 2014

I was wounder how to display how many has saw an image in my gallery website ?

View 1 Replies

Forms Data Controls :: Images Gallery And Listview - How To Get The Name Of The Image

Jan 26, 2010

I have some images gallery with listview that display images from folder (without sql table records for the images but with records to the folder name) the page display the images by the querystring (Gallery_Details.aspx?clubId=1&galleryFolder=1180120100905) the listview have pager that count 15 images for each page. Every image have a onclick command to display the image in large version

[Code]....

When the user click on image, the image display on.
[Code]....

I want to add a button under the "changing" image when the user click the button (onclick) will fire a protected void event (in aspx.cs page) and the next event will done: 1) a new window will open in some size (height + width) without all the explorer tools (only url address) 2) to put in the url address the querystring + the image name for example: Newpage.aspx clubId=1&galleryFolder=1180120100905&image=imagename.jpg, i know how to get the clubId and the galleryFolder but How can i get the name of the image?

the full code is: aspx.cs

[Code]....

View 2 Replies

Forms Data Controls :: Image Gallery On Label Control?

Feb 19, 2010

I want to make Image Gallery on label control where each row will contain 3 images. I also want to use javascript ligtbox on image click event for show the image in larger size.The Path Of the Image is stored in database.

View 2 Replies

Web Forms :: Display Images In GridView As Big One When Clicked Like Image Gallery

May 21, 2012

I am working with ASP.net project.Here I have loaded images into a grid.My issue is when i  am clicking on a particular image in the gridview, it should shown as big image,how it is possible.

View 1 Replies

Web Forms :: Create Slideshow Image Gallery Using Images From Database?

May 7, 2015

I want upload image in database and display image in slide show on website  without gallery and button using gridview.

View 1 Replies

Social Networking :: Import Images From Facebook Image Gallery?

Sep 12, 2012

I want an Api so that i can import all pictures from my photo gallery in my website.

View 1 Replies

Displaying Images On The Gallery, Each Thumbnail Show The Higher Version Of The Image?

Mar 10, 2011

I have to create a webpage that shows gallery of images in a folder. The folder contains different images and also versions of them (like a basic image of xxx1_v1 and then a modification of it as xxx1_v2 and so on...Also, there are xxx2, xxx3 ....). While displaying these images on the gallery, each thumbnail should show the higher version of the image. For example, if there are xxx1_v1, xxx1_v2 then xxx1_v2 must be on the gallery page. Further, when we click on the higher/later version of an image, it must be redirected to another page which shows the other versions of that image. Should i use AJAX / Jquery .

View 3 Replies

Web Forms :: Create Image Gallery By Binding DataList With Images From Folder?

Jul 12, 2012

i want to bind datalist without database.i have not done it before. i want to bind the datalist dynamically in asp.net.

View 1 Replies

Forms Data Controls :: Create Image Gallery (load Images From Sql Server)?

Aug 17, 2010

how to create image gallery? (load images from sql server)

i'm created that use asp:table control

View 4 Replies

Social Networking :: Import Facebook Album Photos And Display As Image Gallery

Jan 3, 2013

I have used downloaded code of (Import Facebook Album Photos and display as Image Gallery in ASP.Net) but it could not work for me .

In the code there is used query string for code so i want to know from where the code value comes and for what purpose we r using this.

protected void Page_Load(object sender, EventArgs e)

View 1 Replies

Data Controls :: Image Gallery With Viewing Extracting Printing And Deleting Capabilities

Sep 14, 2012

i have a database with several paths looking like the one below

C:S&M Site ProjectNEWSMAASitePhotos2GUY093GUY093-Tulips.jpg..

What i aim to do is load the images into a gallery control (if one exist)the users viewing the images should be able to do either of the following:

-Double click on an image to see it bigger or some large predefined size.(thats the viewing part of it)
-Select those images the want and then extract it as a single PDF file to any location on the user machine.
-print all selected images.
-Remove all selected images from the gallery as well as the image path from the database.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved