Custom aspx page with default master page in SharePoint

I had a requirement to create custom aspx page and deploy to _layouts folder.

Got help from this

Page is deployed to _layouts folder.

Code in .aspx file

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ItemDetails.aspx.cs" Inherits="namespace,Version=, Culture=neutral, PublicKeyToken=3ffee3a64ae3d939" Debug="true" MasterPageFile="~/_layouts/v4.master" %>

<%@ Assembly Name="Microsoft.SharePoint.ApplicationPages, 
Version=, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PlaceHolderMain" runat="server">
   main file content

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">

<asp:Content ID="PageTitleInTitleArea" runat="server" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea">

Issue I faced was page CSS.

be sure to use v4.master for SharePoint 2010 and default.master for MOSS.

else page will lose the css part.


  1. Hi Anuja...i have a queation...
    in sharepoint 2007 Advanced search, we have something called "add property restriction" that when i use "title 'contains' xxx", it is not showing up the result because xxx comes at a very later part in the question is that, is there any character limit upto which the property 'contains' recognizes words and displays...i would be really grateful to u if u help me.
    thanks in advance


Post a Comment

Popular posts from this blog

SharePoint 2013 Workflow gets canceled automatically

All about Microsoft Search and SharePoint Online Search

Configure notes as attachments for entity forms - Missing "Attach a File" option