Solved

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

Posted on 2013-11-04
4
967 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

734 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