title: Web Form code behind not creating Partial Class, page inherits "ProjectName.ClassName" instead of just "ClassName". Visual Studio 2013
body: <p>So I'm trying to make an "About" page that can be shared across many web applications that we use. To do this, I'm going to be saving the "AboutBox.aspx" and "AboutBox.aspx.vb" files on our web server. Then, from each application, I'll open a pop-up window that will call the AboutBox page by its url. The Problem I'm having is after I've created the page and copied it to the server, when I try to open the page it's giving me the error:</p>
  
  <p>Parser Error Message: Could not load type 'DemoWebApp.AboutBox'.</p>
  
  <pre><code>Line 1:  &lt;%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AboutBox.aspx.vb" Inherits="DemoWebapp.AboutBox" %&gt;
  </code></pre>
  
  <p>So I'm assuming it's having an issue with "Inherits" having the project name "DemoWebApp" in front of the class name. </p>
  
  <p>Also, the code behind file that was created with the web form has "Public Class AboutBox" instead of what I think they're supposed to have which is "Partial Class AboutBox"</p>
  
  <p>I've tried just getting rid of "DemoWebApp." from the inherits and also just changing the code behind to being a partial class instead of public. This didn't work.</p>
  
  <p>Additionally, someone else created a test web form page from an older version of Visual Studio. This web form didn't have the project title in the inherits and had a partial class instead of public. This page was copied to the server and worked just fine. </p>
  
  <p>I'm using Visual Studio 2013, I'm not sure if it's an issue with this version or something else entirely.</p>
  
  <p>Is there any way that, when you add a new web form file to the project, it will create the file the way I need it to?</p>
  
  <p>EDIT:</p>
  
  <p>Here is my AboutBox.aspx code:</p>
  
  <pre><code>&lt;%@ Page Language="vb" AutoEventWireup="false" CodeBehind="AboutBox.aspx.vb" Inherits="TestAboutBox.AboutBox" %&gt;
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body style="height:238px; width:486px; background-color:green"&gt;
      &lt;form id="form1" runat="server"&gt;
              &lt;div style="width:154px; height:232px; float:left;"&gt;
                  &lt;asp:Image ID="LogoImage" runat="server" Height="232px" ImageAlign="Middle" Width="154px" ImageUrl="small.png"/&gt;
              &lt;/div&gt;
              &lt;div style="width:326px; height:232px; float:right"&gt;
                  &lt;asp:Label ID="LabelProductName" runat="server" Text="Product Name" Font-Size="8.25pt" Font-Names="Microsoft Sans Serif" style="margin:5px"&gt;&lt;/asp:Label&gt;
                  &lt;br /&gt;
                  &lt;asp:Label ID="LabelVersion" runat="server" Text="Version" Font-Size="8.25pt" Font-Names="Microsoft Sans Serif" style="margin:5px"&gt;&lt;/asp:Label&gt;
                  &lt;br /&gt;
                  &lt;asp:Label ID="LabelCopyright" runat="server" Text="Copyright" Font-Size="8.25pt" Font-Names="Microsoft Sans Serif" style="margin:5px"&gt;&lt;/asp:Label&gt;
                  &lt;br /&gt;
                  &lt;asp:Label ID="LabelCompanyName" runat="server" Text="Company Name" Font-Size="8.25pt" Font-Names="Microsoft Sans Serif" style="margin:5px"&gt;&lt;/asp:Label&gt;
                  &lt;br /&gt;
                  &lt;asp:TextBox ID="TextBoxDescription" runat="server" Height="113px" Width="317px" Font-Size="8.25" Font-Names="Microsoft Sans Serif" TextMode="MultiLine" BackColor="#F0F0F0" style="margin:5px" ReadOnly="True"&gt;Description :&lt;/asp:TextBox&gt;
                  &lt;input type="submit" name="OKButton" value="OK" onclick="window.close();" id="OKButton" style="height:21px;width:75px;float:right; margin:5px" /&gt;
              &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Aaand here's my AboutBox.aspx.vb file:</p>
  
  <pre><code>Public Class AboutBox
      Inherits System.Web.UI.Page
  
      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
  
      End Sub
  
  End Class
  </code></pre>
  
  <p>NOTE: I re-made the project under the name "TestAboutBox" since "DemoWebApp" was getting all messed up with me screwing around with stuff.</p>