I am new to SharePoint and want to discuss an issue I want to create a feature that will create custom application page (registration form) and a custom list to store registration form's data. I can create list but i have no idea about how to create registration form ? Should i create .ascx Control for registration form and then add that Control to feature ? Is it correct idea ? Secondly, How i create custom application page in SharePoint ?


It's faily easy to create a custom application page. You can add a application page in existing solution or new solution. Example below is with Empty SharePoint Project template:

enter image description here

enter image description here

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomApplicationPage.aspx.cs" Inherits="CustomApplicationPage.Layouts.CustomApplicationPage.CustomApplicationPage" DynamicMasterPageFile="~masterurl/default.master" %>
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">My Custom Application Page
  <asp:Label runat="server" Text="My Custom Page"></asp:Label>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page

You can also add User Control (ascx) to custom application page as well.

  • Ok! But i want to create application page within feature ?How feature will create application page under featureActivated method?? – SPBeginer Dec 5 '12 at 13:28
  • You can use module element to provision application page. Add Module name as "Pages" and url as "_Layouts" – Falak Mahmood Dec 5 '12 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.