Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

948 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

22 Experts available now in Live!

Get 1:1 Help Now