title: The Name "___" does not exist in the current context
body: <p>I seem to be having an issue with my project in Visual Studio 2012 where I received 21 errors saying the names(ddlstud,hidId,txtName,txtCoverImage,txtReldate,gvVidGame) do not exist in the current context. I have my default.aspx file set to read from my default.aspx.cs file.</p>
  
  <p>Here is my default.aspx file</p>
  
  <pre><code>&lt;%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="True" CodeBehind="Default.aspx.cs" Inherits="VideoGameWiki._Default" %&gt;
  
  &lt;asp:Content runat="server" ID="FeaturedContent" ContentPlaceHolderID="FeaturedContent"&gt;
  
  &lt;/asp:Content&gt;
  &lt;asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent"&gt;
      &lt;asp:GridView ID="gvVidGame" runat="server"&gt;&lt;/asp:GridView&gt;&lt;br /&gt;
      &lt;asp:Label ID="lblName" runat="server" Text="Name: "&gt;&lt;/asp:Label&gt;
      &lt;asp:TextBox ID="txtName" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
      &lt;asp:Label ID="lblStud" runat="server" Text="Studio: "&gt;&lt;/asp:Label&gt;
      &lt;asp:DropDownList ID="ddlStud" runat="server"&gt;&lt;/asp:DropDownList&gt;&lt;br /&gt;
      &lt;asp:Label ID="lblReldate" runat="server" Text="Release date: "&gt;&lt;/asp:Label&gt;
      &lt;asp:TextBox ID="txtReldate" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
      &lt;asp:Label ID="lblCoverImage" runat="server" Text="Cover Image: "&gt;&lt;/asp:Label&gt;
      &lt;asp:TextBox ID="txtCoverImage" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;br /&gt;
      &lt;asp:Label ID="lblDescr" runat="server" Text="Description: "&gt;&lt;/asp:Label&gt;
      &lt;asp:TextBox ID="txtDescr" runat="server"&gt;&lt;/asp:TextBox&gt;
      &lt;br /&gt;
      &lt;asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Add" /&gt;
      &lt;br /&gt;
      &lt;asp:Button ID="btnNext" runat="server" Text="Next" OnClick="btnNext_Click" /&gt;
      &lt;input runat="server" id="hidId" type="hidden" /&gt;
      &lt;asp:Button ID="btnPrev" runat="server" OnClick="btnPrev_Click" Text="Prev" /&gt;
      &lt;asp:Button ID="Btn_delete" runat="server" Text="Delete" /&gt;
  &lt;/asp:Content&gt;
  </code></pre>
  
  <p>and here is my default.aspx.cs file</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  namespace VideoGameWiki
  {
      public partial class _Default : System.Web.UI.Page
      {
          private VideoGamesWikiContainer entities = new VideoGamesWikiContainer();
  
          private int currentId = 0;
      }
  }
  </code></pre>
  
  <p><sup><a href="http://pastebin.com/raw.php?i=NrpfX3Rb" rel="nofollow">complete sources here</a></sup></p>
  
  <p>(EDIT) Here is my designer.cs file as the methods that were suggested did not work unfortunately.</p>
  
  <pre><code> namespace VideoGameWiki {
  
  
  public partial class _Default : System.Web.UI.Page
  {
  
      /// &lt;summary&gt;
      /// gvVidGame control.
      /// &lt;/summary&gt;
      /// &lt;remarks&gt;
      /// Auto-generated field.
      /// To modify move field declaration from designer file to code-behind file.
      /// &lt;/remarks&gt;
      protected global::System.Web.UI.WebControls.GridView gvVidGame;
  </code></pre>
  
  <p><sup><a href="http://pastebin.com/raw.php?i=WsN3RnVX" rel="nofollow">complete sources here</a></sup></p>
  
  <p>Any help would be appreciated!</p>