Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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