title: Problems with inherit while adding custom user control
body: <p>I was trying to implement this custom timepicker user control from <a href="http://www.codeproject.com/Articles/329011/ASP-NET-4-0-TimePicker-User-Control" rel="nofollow">Codeproject Timepicker Control</a></p>
  
  <p>Downloaded the zip file and added the contents inside "CustomControls" Folder to my project. The instructions was to Edit the Inherits line in the aspx page of the User Control to point to your projects root namespace. This is usually the name of your VB.NET project.</p>
  
  <p>I did so and the error was "It may be inaccessible due to its protection level". My namespace for my other pages is "JobRequestWeb" and i have placed it in all other pages's inherits values as "JobRequestWeb.(page name)" so i think there might be a conflict with my namespace and project name? </p>
  
  <pre><code>&lt;%@ Control Language="vb" AutoEventWireup="false" CodeBehind="TimeExtender.ascx.vb" Inherits="JobRequestWeb.TimeExtender" %&gt;
  </code></pre>
  
  <p>That portion of code is the conflicting part..</p>
  
  <p>Heres the codebehind starting declaratives</p>
  
  <pre><code>Imports System
  Imports System.Web.UI
  Imports System.Web.UI.WebControls
  Imports System.ComponentModel
  Imports System.Drawing
  
  ''' &lt;summary&gt;   
  ''' Show Time Picker.
  ''' &lt;/summary&gt;
  ''' &lt;remarks&gt;&lt;/remarks&gt;
  &lt;Category("TimeExtender")&gt; _
  &lt;Description("Show Time Picker")&gt;
  &lt;Browsable(True)&gt; _
  &lt;ToolboxBitmap(GetType(TimeExtender), "TimeExtender.bmp")&gt; _
  &lt;ToolboxData("&lt;{0}:TimePicker ID='TimePicker' runat=""server""&gt; &lt;/{0}:TimePicker&gt;")&gt; _
  Partial Public Class TimeExtender
      Inherits System.Web.UI.UserControl
  </code></pre>