title: "control name" must be convertable to System.Web.UI.Page
body: <p>I just converted a VB.NET project to C#.  But right now even though the namespace for this inherits is right, all my .aspx pages keep saying "[control name] must be convertable to System.Web.UI.Page"</p>
  
  <p>So in this example when I mouse over Activate I get "Activate must be convertable to System.Web.UI.Page"</p>
  
  <pre><code>&lt;%@ Page Language="C#" Inherits="Forum.UI.Activate"  Codebehind="Activate.aspx.cs" %&gt;
  
  
  &lt;asp:Content ID="ctlContent" ContentPlaceHolderID="ctlContentPlaceHolder" runat="Server"&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>Here's the Activate Control:</p>
  
  <pre><code>namespace Forum.UI
  {
      /// &lt;summary&gt;
      /// Code behind for Skins/SkinName/Activate.ascx.
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;&lt;/remarks&gt;
      public class Activate : SkinControl
      {
          #region Private Variables
  
          private string Key;
          private Int32 UserID;
  
          #endregion
  
          #region Constructor
  
          public Activate()
          {
              base.SkinFileName = "Activate.ascx";
          }
  
          #endregion
  
          #region Initialize
  
          protected override void Initialize(Control ctlSkin)
          {
              // track whos on information
              base.TrackSession(EnumTask.ActivatingAccount);
  
              // get querystring values
              Key = base.CurrentContext.CurrentRequest.Key;
              UserID = base.CurrentContext.CurrentRequest.UserID;
  
              if (System.Web.HttpContext.Current.Request.IsAuthenticated)
              {
                  if (UserID != base.CurrentContext.CurrentUser.UserID)
                  {
                      // logout currently logged in user
                      Authentication.Logout();
                      // redirect to this page to refresh controls
                      Common.Globals.Paths.Redirect(Paths.Activate(UserID, Key), false, false);
                  }
              }
  
  
              bool ActivationSuccess = User.ActivateAccount(UserID, Key,
                                                            base.CurrentContext.CurrentSettings.SharedSettings.
                                                                DefaultUserRoleID);
  
  
              if (ActivationSuccess)
              {
  
                  Business.User.UpdatePermissionSet(UserID, 0);
  
  
                  UserRoles.DeleteUserRole(UserID,
                                           base.CurrentContext.CurrentSettings.SharedSettings.
                                               DefaultAwaitingApprovalRoleID);
  
                  UserRoles.AddUserRole(UserID, base.CurrentContext.CurrentSettings.SharedSettings.DefaultUserRoleID);
  
  
                  Sessions.Add(EnumSessionObjects.ConfirmationHeader.ToString(), "Confirmation_HeaderActivationComplete");
                  Sessions.Add(EnumSessionObjects.ConfirmationMesssage.ToString(), "Confirmation_TextActivationComplete");
              }
              else
              {
  
                  Sessions.Add(EnumSessionObjects.ConfirmationHeader.ToString(), "Confirmation_HeaderActivationError");
                  Sessions.Add(EnumSessionObjects.ConfirmationMesssage.ToString(), "Confirmation_TextActivationError");
              }
  
              Business.User.ClearCache(base.CurrentContext.CurrentUser);
  
  
              Common.Globals.Paths.Redirect(Paths.ConfirmationMessage(Sessions.SessionID()), false, false);
          }
  
          #endregion
      }
  }
  </code></pre>
  
  <p>SkinControl.cs inherts a BaseSkinControl.cs and then BaseSkinControl.cs inherits a custom UserControl.cs class and finally UserControl.cs inherits System.Web.UI.UserControl.</p>
  
  <p>This same code worked just fine in VB.NET so I'm not sure why it's complaining.  I have spent countless hours trying to troubleshoot so I'm throwing it up here for hopes at some guesses why this isn't able to resolve.</p>
  
  <p>I don't know if this is enough information but please let me know if not.</p>