0

We were migrating the MOSS 2007 code to Sharepoint 2013 using Visual Studio 2012. We have usercontrols with code behind. When we add the mapped folder Control Templates in Visual Studio. It allows to add the code behind. But the property on this file is Deployment Type - nodeployment and this property is disabled. Is there a way to deploy the code behind files

0

1 Answer 1

1

You can put your code behind file's dll into gac and then reference it in your User Control ".ascx" file. I am pretty sure it will work as I did it myself.

As far as I know be default this should work,

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="CodeBehindExampleUserControl.ascx.cs" Inherits="CodeBehindExampleUserControl" %>

If above doesn't work, I recommend you to go through this article,

how to reference user control deployed

Hope it helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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