Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 June 17th, 2013, 05:54 AM
Authorized User
 
Join Date: May 2013
Posts: 12
Thanks: 3
Thanked 0 Times in 0 Posts
Default clickable picture in detailsview

I am stuck again, I have a detailsview image from a sql dbase, when clicked I would have a other picture from dbase presented in a new screen.

I don't know how to get a click event handle to the Imagefield (in detailsview)

I tried using image button but it seems this control does not allow a dataImgUrlfield like the Imagefield. So picking up the picture from dbase here is problematic.

This my detailsview :
Code:
<asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                    DataKeyNames="Id" DataSourceID="SqlDataSource1" Height="500px" Width="500px" 
                    GridLines="None" onitemcommand="DetailsView1_ItemCommand">
                    <Fields>
                        <asp:ImageField DataImageUrlField="ImgMainM" ControlStyle-Height="500" ControlStyle-Width="500" />
                    </Fields>
                </asp:DetailsView>
does anyone know how to pick up the click event and present another picture in the new screen?

Thanks,

Erik
 
Old June 17th, 2013, 11:06 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Erik,

Take a look at exercise 3 from Chapter 14 on page 527. Is that the behavior you're looking for? The answer can be found in Appendix A.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Erik Severiens (June 19th, 2013)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Clickable background AbrarNazeer CSS Cascading Style Sheets 4 April 9th, 2008 12:22 AM
Clickable images Using xml and xsl(Urgent) Akriti XSLT 11 June 4th, 2007 05:45 AM
Clickable images in grid or detailsview ewhizz ASP.NET 2.0 Basics 1 August 2nd, 2006 10:33 AM
OLE picture - accessing the picture property bdcrisp Excel VBA 0 December 7th, 2003 09:35 PM
Make a control Clickable Hal Levy ASP.NET 1.0 and 1.1 Basics 3 November 7th, 2003 01:24 PM





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