I wanted to have a code behind file for home.aspx file for my sharepoint site. but on adding this
<%@ Page Language="C#" DynamicMasterPageFile="~masterurl/default.master" Inherits="MyNamspace.MyCustomCodeBehindForHomeAspx, $SharePoint.Project.AssemblyFullName$" %>
It is throwing this error : The dynamicmasterpagefile attribute on the page directive is not allowed in this page.
I want to know why it is throwing this error