BruceLee
DocumentDiscussion

导航

 

现象,自定义开发的页面,部署到Layout下。页面使用了MOSS的RichTextField服务器端控件

<SharePointWebControls:RichTextField ID="RichTextField1" ControlMode="New" FieldName="CommListTopicContent" runat="server">
        </SharePointWebControls:RichTextField>

控件必须指定ControlMode和FieldName否则页面报错,没有指定这2个属性。

直接在IE打部署后的URL,http://satyambrucelee:8088/_layouts/WebForm1.aspx,报如下错误。

对象的当前状态使该操作无效。   在 Microsoft.SharePoint.SPFolder.get_ContentTypeOrder()
   在 Microsoft.SharePoint.SPContext.get_ContentTypes()
   在 Microsoft.SharePoint.SPContext.get_ContentType()
   在 Microsoft.SharePoint.SPContext.get_Fields()
   在 Microsoft.SharePoint.WebControls.FormComponent.get_Fields()
   在 Microsoft.SharePoint.WebControls.FieldMetadata.get_Field()
   在 Microsoft.SharePoint.Publishing.WebControls.RichHtmlField.OnInit(EventArgs e)
   在 System.Web.UI.Control.InitRecursive(Control namingContainer)
   在 System.Web.UI.Control.InitRecursive(Control namingContainer)
   在 System.Web.UI.Control.InitRecursive(Control namingContainer)
   在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

原因:

因为是MOSS包装的服务器断控件,控件后台做了一些操作,所以页面URL后必须包含ListId的值,如果要做其他处理还需要包含其它参数

?List=必须
&RootFolder=
&ContentTypeId=
&Source=

posted on 2008-09-17 22:43  Bruce Lee  阅读(468)  评论(0编辑  收藏  举报