SharePoint are two types,
- Site Pages
- Application Pages
- Site pages are stores in the Content-Database of the web application.
- 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)
- From the Visual Studio right click on your project and add new mapped layout folder “see image below” Add SharePoint mapped layout folder
- 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.
- 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”
- SharePoint Custom Error Application Page Load Event Handler
- 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