I’m making a code behind file for the location web page of sharepoint.
The next web page directive was used
<%@ Meeting Identify="Microsoft.SharePoint, Model=14.0.0.0, Tradition=impartial, PublicKeyToken=71e9bce111e9429c"%>
<%@ Web page Language="C#" CodeBehind="MyCustPage.cs" Inherits="CustPage.MyCustPage, CustPage, Model=1.0.0.0, Tradition=impartial, PublicKeyToken=44ba9bb23d3f44ca" MasterPageFile="~masterurl/default.grasp" meta:progid="SharePoint.WebPartPage.Doc" %>
<%@ Import Namespace="Microsoft.SharePoint.WebPartPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Meeting="Microsoft.SharePoint, Model=14.0.0.0, Tradition=impartial, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Meeting="Microsoft.SharePoint, Model=14.0.0.0, Tradition=impartial, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Meeting Identify="Microsoft.Net.CommandUI, Model=14.0.0.0, Tradition=impartial, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Meeting="Microsoft.SharePoint, Model=14.0.0.0, Tradition=impartial, PublicKeyToken=71e9bce111e9429c" %>
My .cs file is as follows
utilizing System;
utilizing System.Collections.Generic;
utilizing System.Linq;
utilizing System.Textual content;
utilizing System.Net.UI;
namespace CustPage
{
public class MyCustPage:Web page
{
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("<script>alert('it labored')</script>");
}
}
}
I get this error :
The bottom sort ‘CustPage.MyCustPage’ shouldn’t be allowed for this web page. The
sort shouldn’t be registered as protected.
I’ve solely achieved two issues : first create an aspx file after which a separate class library.
Any assist could be appreciated