title: How to inherit a UserControl from another UserControl?
body: <p>Is it possible to inherit a User control from another user control?</p>
  
  <p>The thing I'm trying to achieve is a user control inheriting from another user control. So I have baseusercontrol.ascx, and this just has text "Stuff". Then I have another user control, childusercontrol.ascx inheriting off of baseusercontrol.ascx. If I don't change anything in childusercontrol.ascx, I would expect the baseusercontrol.ascx text to display of "Stuff".</p>
  
  <p>And also I should be able to extend the base user control functionalities in derived one.</p>
  
  <p>I have also tried something like <a href="https://stackoverflow.com/questions/9020335/derive-user-control-from-custom-user-control-base-class"><strong>this</strong></a>, but its not enough in my case.</p>
  
  <p>Now my childusercontrol.ascx looks lie below</p>
  
  <pre><code>&lt;%@ Control Language="C#" AutoEventWireup="true" CodeFile="childusercontrol.ascx.cs" Inherits="test_childusercontrol" %&gt;
  &lt;%@ Register src="baseusercontrol.ascx" tagname="baseusercontrol" tagprefix="uc1" %&gt;
  </code></pre>
  
  <p>childusercontrol.ascx.cs as below</p>
  
  <pre><code>public partial class test_childusercontrol : baseusercontrol
  {
      protected void Page_Load(object sender, EventArgs e)
      {
  
      }   
  }
  </code></pre>
  
  <p>When I browse this page Im getting error as</p>
  
  <pre><code>Object reference not set to an instance of an object.
  Description : An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
  Exception Details : System.NullReferenceException: Object reference not set to an instance of an object.
  </code></pre>
  
  <p>Any clue?</p>