Could not load type error in application page

3.4k Views Asked by At

I have created a application page for login functionality in sharepoint by following this post.

But this giving me an error at inheriting the page. I have folder structure and .aspx file like below. enter image description here Did I done any mistake while giving the link to the .cs file in the application page? After I deployed into my site, it is giving me error like below. enter image description here I am trying to resolve it from 2 hrs, but unable to find the solution. Can any one suggest me the way to do it please!!

3

There are 3 best solutions below

0
On

Add $SharePoint.Project.AssemblyFullName$ to your Inherits attribute

Instead of <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YourPage.aspx.cs" Inherits="YourNamespace.YourPage" %>

Use <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="YourPage.aspx.cs" Inherits="YourNamespace.YourPage,$SharePoint.Project.AssemblyFullName$" %>

0
On

This could also be happened when there are another reference to that assembly which didn't exist. To show the error, simply check Ha Doan answer.

0
On

Try to add
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
before
<%@ Page ... %>