Tuesday, 17 February 2015

SharePoint Pages


SharePoint are two types,

  1. Site Pages
  2. Application Pages
Site Pages 
  • Site pages are stores in the Content-Database of the web application.
Application Pages
  • Application Pages are stored in Server-File system, under the _Layout folder.
    • (D:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\LAYOUTS)
  • These pages are common to all web-applications


Creating the Application Page (custom error page)

  1. From the Visual Studio right click on your project and add new mapped layout folder “see image below” Add SharePoint mapped layout folder
  2. Right-click on the Layouts folder then add new application page from “SharePoint” tab in “New” windows “see the image below, Add SharePoint application page.
  3. The application page contains 4 content placeholder tags header, title, body, page title in the title area, simply add a label on the body and go to the code behind of it and add code to print the message from the query string   “see 2 images below”
  4. SharePoint Custom Error Application Page Load Event Handler
  5. Deploy your visual studio solution and try it, it will look like that below image

SharePoint event receiver custom error page

No comments:

Post a Comment