2

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 ?

1 Answer 1

0

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=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, 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>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">My Custom Application Page
  <asp:Label runat="server" Text="My Custom Page"></asp:Label>
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
My Application Page
</asp:Content>

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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