在Publishing站点自定义EditForm

刚刚在Team Site启用了Publishing Feature,发现自己自定义过的EditForm竟然变样子了,似乎某些Publishing的功能注入到了里面,显示的不伦不类。

image

Google了一下,发现很多有着同样困扰的同学,同时也发现了一个很好的解决方案:

只要增加一个如下所示的控件就行了,这样可以屏蔽掉默认的Publishing默认的控件。

<asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server"/>
<asp:Content ContentPlaceHolderId="SPNavigation" runat="server"/>
<asp:Content ContentPlaceHolderId="PlaceHolderMain" runat="server">

副作用:

Edit Page不能使用了,不过对我而言,这个副作用挺好的,本来我就不希望客户能够看到我自定义的东西。

image

原文:http://kitmenke.com/blog/2010/12/11/customizing-editform-aspx-in-a-publishing-site/

原文地址:https://www.cnblogs.com/lambertqin/p/1969782.html