Solved

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

Posted on 2013-11-04
4
910 Views
Last Modified: 2013-11-04
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
Comment
Question by:bujjigadu
  • 2
4 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
Comment Utility
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
 

Author Comment

by:bujjigadu
Comment Utility
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
 
LVL 4

Accepted Solution

by:
ShareD_Point earned 300 total points
Comment Utility
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
 

Author Closing Comment

by:bujjigadu
Comment Utility
good
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now