Solved

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

Posted on 2013-11-04
4
985 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39622225
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
ID: 39622355
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
ID: 39623031
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
ID: 39623411
good
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
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…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Suggested Courses

628 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