Hi to all,
This refers to the sample website "Planet Wrox" downloaded from p2p. I added a page "PictureDetails.aspx" in the "PhotoAlbums" folder so that it shows an enlarged image of the thumbnail that is clicked in the "Gigpics" page. After seeing the full image when I navigate back (either by pressing back button of browser or by clicking Gigpics link the dropdown goes back to the the first item in choice and the thumbnails disappear.
I checked the viewstate propery of the dropdown list, the image listview and also added "enableviewstate = "True" in the page directive.
Still I cannot understand why it the drop down goes back to the first element and the thumbnails vanish.
Any help in solving this will be highly appreciated.
One more feature I am thinking of adding is to display the date of uploading below all the thumbnails in the gigpics page. The system date should be automatically added whenever a user uploads an image. I added a column "DtUpLded" in the "Picture" table but how to populate it with current date?
Regards
Sirish.
========================================
Pages & codes added:
source of PictureDetails.aspx
-----------------------------------------
Code:
<%@ Page Language="VB" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="false" CodeFile="PictureDetails.aspx.vb" Inherits="_Default" Title="Full Size Image" %>
<asp:Content ID="Content2" ContentPlaceHolderID="cpMainContent" Runat="Server">
<asp:Image ID="image1" runat="server" ImageAlign="Middle" Width="600" />
</asp:Content>
------------------------------------------
code of PictureDetails.aspx.
vb
-----------------------------------------------------
Code:
Partial Class _Default
Inherits BasePage
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Protected Sub Image1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Image1.Load
Dim imgUrl As String = Request.QueryString.Get("ImageUrl")
image1.ImageUrl = imgUrl
End Sub
End Class
------------------------------------------------------------------
Added the following code under ItemTemplate of the Listview to create the Hyperlink for each thumbnail
-----------------------------------------------------------
Code:
<asp:HyperLink ID = "HyperLink1" runat="server" NavigateUrl= '<%# "PictureDetails.aspx?ImageUrl="+Eval("ImageUrl") %>' >
<asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("ImageUrl") %>' ToolTip='<%# Eval("ToolTip")%>' />
</asp:HyperLink>
------------------------------------------------------------------