Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: control events


Message #1 by "Adabie, Judy" <jadabie@b...> on Thu, 5 Dec 2002 07:35:01 -0600
This compiles fine but it never goes to the event when the button is
pressed.  All the code is in a class that is used by a page.  


-----Original Message-----
From: Einar Paul Qvale [mailto:einar.paul.qvale@f...]
Sent: Thursday, December 05, 2002 4:36 PM
To: ASPX_Professional
Subject: [aspx_professional] RE: control events


		ImageButton IB = new ImageButton();
		IB.Click += new
System.Web.UI.ImageClickEventHandler(IB_clicked);

		protected void IB_clicked(object sender,
System.Web.UI.ImageClickEventArgs e)
		{
		}

You should probably add the control in the Page_Init function

-----Original Message-----
From: Adabie, Judy [mailto:jadabie@b...] 
Sent: 5. desember 2002 05:35
To: ASPX_Professional
Subject: [aspx_professional] control events


How can I access the events for a server control that was created in
code. Such as accessing the Click event for the ImageButton created
below:
			ImageButton IB;	
			IB = new ImageButton;
			IB.ID = "myImageButton";
			Controls.Add(IB);
Thanks!





  Return to Index