2 deleted 3 characters in body
source | link

.cs file types are not visible for SharePoint pages/pagelayouts.

In order for you to add your own to one of the Out-of-the-box pages like Home.aspx you'll have to

  • Create a new .cs file in Visual Studio which derives from either Page or WebPartPage

Example:

public class MyCustomCodeBehindForHomeAspx : Page
  • Then you have to open Home.aspx in e.g. SharePoint Designer and add the fully qualified name

Example:

<%@ Page 
    Language="C#" 
    DynamicMasterPageFile="~masterurl/default.master" 
    Inherits="MyNamspace.MyCustomCodeBehindForHomeAspx, $SharePoint.Project.AssemblyFullName$"fully qualified assembly name here"
    %>

.cs file types are not visible for SharePoint pages/pagelayouts.

In order for you to add your own to one of the Out-of-the-box pages like Home.aspx you'll have to

  • Create a new .cs file in Visual Studio which derives from either Page or WebPartPage

Example:

public class MyCustomCodeBehindForHomeAspx : Page
  • Then you have to open Home.aspx in e.g. SharePoint Designer and add the fully qualified name

Example:

<%@ Page 
    Language="C#" 
    DynamicMasterPageFile="~masterurl/default.master" 
    Inherits="MyNamspace.MyCustomCodeBehindForHomeAspx, $SharePoint.Project.AssemblyFullName$"
    %>

.cs file types are not visible for SharePoint pages/pagelayouts.

In order for you to add your own to one of the Out-of-the-box pages like Home.aspx you'll have to

  • Create a new .cs file in Visual Studio which derives from either Page or WebPartPage

Example:

public class MyCustomCodeBehindForHomeAspx : Page
  • Then you have to open Home.aspx in e.g. SharePoint Designer and add the fully qualified name

Example:

<%@ Page 
    Language="C#" 
    DynamicMasterPageFile="~masterurl/default.master" 
    Inherits="MyNamspace.MyCustomCodeBehindForHomeAspx, fully qualified assembly name here"
    %>
1
source | link

.cs file types are not visible for SharePoint pages/pagelayouts.

In order for you to add your own to one of the Out-of-the-box pages like Home.aspx you'll have to

  • Create a new .cs file in Visual Studio which derives from either Page or WebPartPage

Example:

public class MyCustomCodeBehindForHomeAspx : Page
  • Then you have to open Home.aspx in e.g. SharePoint Designer and add the fully qualified name

Example:

<%@ Page 
    Language="C#" 
    DynamicMasterPageFile="~masterurl/default.master" 
    Inherits="MyNamspace.MyCustomCodeBehindForHomeAspx, $SharePoint.Project.AssemblyFullName$"
    %>