I have a thin class which inherits from UserControl which only adds an event, as follows:
public class DynamicUserControl :UserControl
public event EventHandler dynamicControlEvent;
Then I have a couple of user controls that inherit from that, i.e.
public partial class NewPageControl : DynamicUserControl
protected void btnNewPageSubmit_Click(object sender, EventArgs e)
// package up the event and pass it on to the container
if ( dynamicControlEvent != null )
Trouble is, I get a compile error on the 2 lines at the bottom that attempt to fire the event that was declared in the superclass. Any idea why this is or how to get around it? Thanks.