Sharepoint 2013 - Create custom page with code behind

I have many event receivers and, on error, I want to redirect to a custom page that will manage those errors.

I know that I can create a custom page per Event Receiver with the creation of Mapped Folder in Visual Studio, but, I want a single page that’ll deal with any of my ER.

In addition of that, this page must have a code-behind because I want to manage the error sent by the ER (via a redirection), using the Response.Querystring property of the page.

Is there any way to create a custom aspx page with code behind at the root of the site collection ?

Thanks for your answer.

Edit (2016-06-27): I followed the tutorial indicated below, but I have an error when I deploy my solution: Error occurred in deployment step 'Add Solution': Error: Cannot find this file specified in the manifest file: SP2013_ErrorPage.dll

I adapted the Package.Template.xml like that for my solution:

<?xml version="1.0" encoding="utf-8"?>
<Solution xmlns="">
<Assembly Location="SP2013_ErrorPage.dll"
    <SafeControl Assembly="$SharePoint.Project.AssemblyFullName$"

SharePoint Asked by GwenGuts on January 7, 2021

1 Answers

One Answer

You first need to finalize that which kind of page do you need like Application Page or Site Page?

Using the most basic definition, a site page is customizable by an end user while an application page is not. That means that a user can pop open SharePoint Designer 2010 and make changes to a site page, but they cannot do this with an application page. So, what do we mean by “customizable”? When we open SharePoint Designer 2010 and make changes to a site page, those changes are stored in the database. The next time we request the page, the page is loaded from the database. There are more differences than this, but the key difference is really the ability to customize a page.

You can get more details from below link.

Creating a SharePoint Site Page With Code-Behind Using Visual Studio 2010

Answered by Hardik on January 7, 2021

Add your own answers!

Related Questions

Is there an API or web service for Copy-SPSite?

0  Asked on October 25, 2021 by spdevadmin


Calculated Fields and Outputting to Excel

1  Asked on February 28, 2021 by brandon


PnP with .NET Core

1  Asked on February 23, 2021 by thomas-segato


How can I use MS Web Test to upload files to SharePoint?

2  Asked on February 19, 2021 by user1258


Filtering List View by Current User Email

2  Asked on February 18, 2021 by hushhoney


Ask a Question

Get help from others!

© 2022 All rights reserved.