|
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace EventsAcrossControls
{
public class SenderControl : UserControl
{
protected Button uxButton;
protected ImageButton uxImage;
private ButtonEvents events;
private void Page_Load (object sender, EventArgs e)
{
events = new ButtonEvents(Context.Items);
}
private void uxButton_Click (object sender, EventArgs e)
{
events.ClickButton(sender, e);
}
private void uxImage_Click (object sender, ImageClickEventArgs e)
{
events.ClickImageButton(sender, e);
}
override protected void OnInit (EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent ()
{
uxButton.Click += new EventHandler(uxButton_Click);
uxImage.Click += new ImageClickEventHandler(uxImage_Click);
Load += new EventHandler(Page_Load);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have programmed applications in ASP.NET from the very beginning. My favourite .NET language is C#, and I am a fan of Test Driven Design. I was an experienced VB6 coder before the .NET era. I have also done some Transacted SQL programming in Sql Server. Although I have made a career on Microsoft technology, I have browsed enough Java code to read it fluently, and I find Smalltalk and Ruby very interesting.
I live a few kilometers away from Oslo.
My email is
thomas.eyde@gmail.com.