Tags

I found the easiest way to add custom page to SharePoint is to create a host aspx page and embed usercontrol inside, so next time if you have any update you can just update the usercontrol.

Below is the aspx inline page and I upload to Pages library

<%@ Page Language="C#"  EnableSessionState="true"  MasterPageFile="~masterurl/default.master"%>
<%@ Register src="~/_controltemplates/TestUserControl.ascx" tagname="TestUserControl" tagprefix="uc1" %>

<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"/> 
      <uc1:TestUserControl ID="JDEGLSearch" runat="server" /> 
</asp:Content>

The TestUserControl.ascx just a User Control created in the visual studio. You can add the ui into 12\TEMPLATE\CONTROLTEMPLATES

or you can add into _\12\TEMPLATE\LAYOUTS folder but which means everyone can access the page

<%@ Page language="C#" MasterPageFile="~/_layouts/application.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage,Microsoft.SharePoint,Version=12.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="Content2" ContentPlaceHolderID="PlaceHolderMain" runat="server">
  <b>Hello</b>   
</asp:Content>
Advertisements