Bootstrap FreeKB - Visual Studio - Resolve "Parser Error is not allowed here because it does not extend class System.Web.UI.Page"
Visual Studio - Resolve "Parser Error is not allowed here because it does not extend class System.Web.UI.Page"

Updated:   |  Visual Studio articles

Follow these directions to fix error 'Parser Error is not allowed here because it does not extend class System.Web.UI.Page' in Visual Studio. This error typically appears due to some issue between the Master Page and the Content Page. The very first line of the Content Page has a line of code for the Master Page being used. Notice near the end of this line is code such as Inherits='stage.index'. The Inherits is related to this error.

The easy fix to this problem is to name the page default.aspx instead of index.aspx.

<%@ 
Page Title="" 
Language="vb" 
AutoEventWireup="false" 
MasterPageFile="~/MasterPages/Content.Master" 
CodeBehind="index.aspx.vb" 
Inherits="stage.index" 
%>

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


August 04 2022 by kishan
nice!

Add a Comment


Please enter f7ac20 in the box below so that we can be sure you are a human.