Sharepoint webpartzone更改无法正常工作

时间:2012-03-01 15:20:17

标签: asp.net sharepoint sharepoint-2010

我已经创建了一个自定义的webpart页面。当我在页面上添加webparts它工作正常。但是,如果我改变webpart区域,那么它就不起作用了。保存后,webpart区域不会更改。

我的aspx页面:

<%@ Page masterpagefile="~masterurl/default.master" language="C#"       Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral,PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" meta:progid="SharePoint.WebPartPage.Document" %>
<%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>


<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
 <WebPartPages:SPProxyWebPartManager runat="server" id="spwebpartmanager" />
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td  valign="top" width="50%"><WebPartPages:WebPartZone runat="server"  ID="MainLeft" Title="loc:MainLeft" />
                            &#160;</td>
                        <td  valign="top" width="50%"><WebPartPages:WebPartZone runat="server"  ID="MainRight" Title="loc:MainRight" />
                         &#160;</td>      
          </tr>
         </table>
</asp:Content>    

1 个答案:

答案 0 :(得分:0)

<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">
                <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
    <td  valign="top" width="50%">
<WebPartPages:WebPartZone runat="server" ID="MainLeft" Title="loc:MainLeft"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
</td>
    <td  valign="top" width="50%">
<WebPartPages:WebPartZone runat="server" ID="MainRight" Title="loc:MainRight"><ZoneTemplate></ZoneTemplate></WebPartPages:WebPartZone>
</td>
</tr>
         </table>
</asp:Content>