现象,自定义开发的页面,部署到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=

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
  • 2021-10-16
  • 2021-06-16
猜你喜欢
  • 2022-12-23
  • 2021-08-13
  • 2022-01-05
  • 2021-12-07
  • 2021-10-09
  • 2021-08-20
  • 2022-12-23
相关资源
相似解决方案