Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 17th, 2013, 05:54 AM
Authorized User
Points: 51, Level: 1
Points: 51, Level: 1 Points: 51, Level: 1 Points: 51, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old June 17th, 2013, 11:06 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
Erik Severiens (June 19th, 2013)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:31 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.