Search code examples
c#asp.netmaster-pagesrenamingcontent-pages

How to Name Content Pages in Visual Studio 2013


So I am having some difficulty with Visual Studio. My goal is to set up a master page and have content pages to make sure that the layout is consistent throughout the site.

The Problem: When I run my file I have this error come up: enter image description here

Steps I've Taken so Far:

Website(in the solution explorer)>Add New Item> Choose Web Form> Name it "homePage"> Click choose MasterPage File and choose my Master Page.

I followed the steps in this forum post and I am still receiving the Error! I have looked at the code-behind files ad the Inherits match up I am incredibly stuck on this one guys. Can anyone help me out?


Solution

  • Your error message tells you what the problem is.

    Make sure that the class defined in the code file matches the 'inherits' attribute.

    Look in your.aspx file. There should be an @Page directive with an inherits attribute. This attribute should be set to your class name, and this is case sensitive.