Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm trying to use existing aspx page in SharePoint 2010. Page it self depend on some 3rd party classes and I provided source for them and additional assemblies, and project compiles and deploys to sharepoint correctly.

Page is put in layouts directory. Page definition has also a Page directive:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Frameset.aspx.cs" Inherits="Frameset.Test.Source.Frameset.Frameset_Frameset"  %>

File Frameset.aspx.cs is present and project compiles without error. But when I try to access that page, I'm getting following error:

System.Web.HttpException: The file '/_layouts/Frameset.Test/Frameset/Frameset.aspx.cs' does not exist.   

When I change CodeFile to CodeBehind, I'm getting following error:

System.Web.HttpException: Could not load type 'Frameset.Test.Source.Frameset.Frameset_Frameset'.  

Which is strange, because this type (class) is defined in Frameset.aspx.cs, and VS doesn't complain about missing types.

share|improve this question
add comment

1 Answer

As far as I know, code-behind usage in SharePoint requires you to specify the full assembly name of the assembly that contains the codebehind class (that is - assuming that your assembly is deployed to the gac). Please see if by using the full name your problem is resolved, ie:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Frameset.aspx.cs" 
   Inherits="Frameset.Test.Source.Frameset.Frameset_Frameset, ........, Version=#.#.#.#, Culture=neutral, PublicKeyToken=##########"  %> 
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.