无法在应用程序页面中加载类型错误

时间:2012-11-26 07:09:04

标签: asp.net sharepoint applicationpage

我已经通过关注this post在sharepoint中创建了登录功能的应用程序页面。

但是这在继承页面时给了我一个错误。我有文件夹结构和.aspx文件,如下所示。 enter image description here 在给应用程序页面中的.cs文件链接时,我是否犯了任何错误? 在我部署到我的网站后,它给出了如下错误。 enter image description here 我试图从2小时解决它,但无法找到解决方案。任何人都可以建议我这样做!!

3 个答案:

答案 0 :(得分:1)

将$ SharePoint.Project.AssemblyFullName $添加到您的Inherits属性

而不是<%@ Page Language =“C#”AutoEventWireup =“true”CodeBehind =“YourPage.aspx.cs”Inherits =“YourNamespace.YourPage”%>

使用<%@ Page Language =“C#”AutoEventWireup =“true”CodeBehind =“YourPage.aspx.cs”Inherits =“YourNamespace.YourPage, $ SharePoint.Project.AssemblyFullName $ ” %GT;

答案 1 :(得分:0)

尝试添加
<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>

<%@ Page ... %>

答案 2 :(得分:0)

当没有另一个对该程序集的引用时,也可能发生这种情况。要显示错误,只需检查Ha Doan答案。