Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
|
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 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 August 28th, 2008, 06:45 AM
Authorized User
 
Join Date: Aug 2008
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Still nothing. It doesn't create my EventHandler, because when I debug with the break point on the:
myThumb_btn.Click += new System.Web.UI.ImageClickEventHandler(myThumb_Click );
it appears on the line but when is the time to go on the myThumb_Click function it goes out from the program. I try to make like they do on the link you gave me but the problem is that it creates only one thumb every time and still no click.
Thank you.

 
Old August 28th, 2008, 06:50 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

As is often the case the error is in how you are calling the code above, not in the code above, so without seeing more of your page it is impossible to answer the question.

Wherever the bit of code that calls AddThumb() is, you need to move that code to Page_Init().

/- Sam Judson : Wrox Technical Editor -/
 
Old March 12th, 2010, 06:29 AM
Authorized User
 
Join Date: Sep 2009
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Wink Actually, I think you want to use Page_Load

Code:
Page_Load
{
AddThumb();
}
Not that not just the ImageButton, but Conrol.Add will also need to occur on Page_Load.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse Event Handler daniel.mihalcea C# 2008 aka C# 3.0 1 September 8th, 2008 06:30 AM
Mark a point in Image and handle click event on it savan_thakkar ASP.NET 1.0 and 1.1 Professional 3 June 9th, 2006 02:56 AM
Event handler samir_katore Pro VB 6 6 June 8th, 2006 01:22 PM
chapter 8, click event handler krothenb BOOK: Beginning Access VBA 1 June 30th, 2004 03:02 PM





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