Is this .aspx inside a project where you have installed EPiServer? By this I mean, did you set it up using the EPiServer Deployment Center?
If you have everything installed correctly, you need to make sure that the template file (the aspx.cs file) inherits from EPiServer.Template page.
This solution is a copy from our live server. I moved it to my local machine manually. I did not set it up using EPiServer Deployment Center.
In this solution, I have 3 projects. It's only on one project which I'm having these problems with.
The template file inherites from PageTypeBuilder.UI.TemplatePage<T>
On the aspx file, I added a reference to EPiServer.Web.WebControls and EPiServer is now recognized.
However Property is not. Element 'property' is not a known element. This can occur if there is a compilation error in the Web Site, or the web.config file is missing.
Any ideas?
You need to make sure that EPiServer WebControls is registered in your web.config file under the pages and controls element:
<pages validateRequest="false" enableEventValidation="true" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"> <controls> <add tagPrefix="EPiServer" namespace="EPiServer.WebControls" assembly="EPiServer"/> <add tagPrefix="EPiServer" namespace="EPiServer.Web.WebControls" assembly="EPiServer"/> <add tagPrefix="EPiServer" namespace="EPiServer.Web.WebControls" assembly="EPiServer.Web.WebControls"/> <add tagPrefix="XForms" namespace="EPiServer.XForms.WebControls" assembly="EPiServer.XForms"/> <add tagPrefix="WebParts" namespace="EPiServer.WebParts.WebControls" assembly="EPiServer"/> </controls> <namespaces> <add namespace="System.Web.Mvc"/> <add namespace="System.Web.Mvc.Ajax"/> <add namespace="System.Web.Mvc.Html"/> <add namespace="System.Web.Routing"/> <add namespace="System.Linq"/> <add namespace="System.Collections.Generic"/> </namespaces> </pages>
Otherwise you'll need to register it in your .aspx/.ascx files.
On a project, on my aspx, I have this: