Site Page created with Visual Studio and customized with SharePoint Designer??? HOW?

Unanswered Site Page created with Visual Studio and customized with SharePoint Designer??? HOW?

  • Wednesday, March 14, 2012 8:38 PM
     
     

    HI!

    how I can create a Site Page with Visual Studio and deploy it as a wsp and after this customized it with the SharePoint Designer?

    I can deploy a site page but when I try to edit in in the SharePoint Designer I get this message box:

    

    WHY?

All Replies

  • Wednesday, March 14, 2012 9:06 PM
     
     

    Pages deployed using modules in Visual Studio can be customized using SharePoint Designer. Have you tried opening the site with SharePoint Designer and browse to the library containing the file?

    What did you include in the ASPX file?


    SharePoint Developer | @zeemanj | Blog

  • Wednesday, March 14, 2012 9:18 PM
     
      Has Code

    Opening with SharePoint Designer is not a problem... but how I can browse to the library in SharePoint Designer that contains the file?

    The aspx contains this:

    <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
    <%@ 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" %>
    <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    
    <%@ Page Language="C#" 
        Inherits="portalFeatureCollection.CustomSitePage.CustomSitePageModule.CutomSitePage" 
        title="CutomSitePage" 
        MasterPageFile="~masterurl/default.master" 
        meta:progid="SharePoint.WebPartPage.Document" %>
    
    <asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
      <asp:Button runat="server" ID="button1" Text="Click me" />
      <asp:Label runat="server" ID="label1"/>
    </asp:Content>

    cs:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.SharePoint.WebControls;
    using Microsoft.SharePoint.WebPartPages;
    using System.Web.UI.WebControls;
    
    namespace portalFeatureCollection.CustomSitePage.CustomSitePageModule
    {
        public class CutomSitePage : WebPartPage
        {
            protected Button button1;
            protected Label label1;
    
            protected void Page_Init(object sender, EventArgs e)
            {
                button1.Click += new EventHandler(Button_Click);
            }
    
            protected void Button_Click(object sender, EventArgs e)
            {
                label1.Text = System.DateTime.Now.ToLongTimeString();
            }
        }
    }

    I can debug this site without any problem.

  • Wednesday, March 14, 2012 10:19 PM
     
      Has Code

    After adding this to the web.config:

          <PageParserPaths>
            <PageParserPath  VirtualPath="/mySites/1/*" IncludeSubFolders="true" CompilationMode="Always" AllowServerSideScript="true" />
          </PageParserPaths>

    same issue :(

  • Thursday, March 15, 2012 10:49 AM
     
     
    Exists another solution?
  • Thursday, March 15, 2012 7:16 PM
     
     

    The file is fine, have you tried looking in the ULS log for additional errors that occur when editing the page in SharePoint Designer?

    Under Site Objects, All Files you can navigate to the Site Pages library to view your page.


    SharePoint Developer | @zeemanj | Blog

    • Marked As Answer by Shimin Huang Friday, March 23, 2012 7:10 AM
    • Unmarked As Answer by gicio Friday, March 23, 2012 7:21 AM
    •