Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1023
  • Last Modified:

DisplayForm' is not allowed here because it does not extend class 'System.Web.UI.Page'.

I got the above error in my aspx page created in visual studio 2012 for sharepoint project deployed as farm solution.

I created application page called DisplayForm.aspx and moved the page from layouts folder to a different folder.

I changed the base class from layouts to webpartpages. Then when I run the page I received the above error.

What could be the reason
0
bujjigadu
Asked:
bujjigadu
  • 2
1 Solution
 
Rainer JeschorCommented:
Hi,
first: which SharePoint version and edition are you targeting?
Second: it is a really really bad idea to build a page that has the same name as OOTB-pages
Third: Where did you move the file? Can you post the ASPX markup as well as the code behind?

Thanks.
Rainer
0
 
bujjigaduAuthor Commented:
I'm using Sharepoint 2013 version
The page name I have given is not same as OOTB. OOTB page name is DispForm.aspx and I'm building DisplayForm.aspx

Please see the code
Displayform.txt
DisplayForm-vb-file-.txt
0
 
ShareD_PointCommented:
Hi,

Your Inherits attribute in aspx markup is
Inherits="PhysicianSearch.Layouts.PhysicianSearch.DisplayForm"

Open in new window

whereas your code behind has a namespace
 Namespace Physicians

Open in new window

You may need to check the correctness of the Inherits attribute or Namespace used. This may be the reason why the class DisplayForm not getting loaded.

Again, you haven’t reverted on where you moved DisplayForm.aspx.

Hope this helps
0
 
bujjigaduAuthor Commented:
good
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now