繁体   English   中英

如何用SP2007以编程方式自定义editform.aspx / newform.aspx?

[英]How to programmatically customize editform.aspx/newform.aspx with SP2007?

我一直在寻找解决方案达数小时之久,但无法自定义列表表单。 尽管在SPDesigner下修改表单非常容易,但在VS2008中我找不到找到相同方法的方法。

有谁知道以编程方式自定义表单的方法?

非常感谢你

定制newform.asxp和editform.aspx的最佳方法(在我看来)可能是:

在新的Visual Studio解决方案上:

  • 定义列表的内容类型
  • 根据CT定义列表shema
  • 在schema.xml的“表单”部分中,为editform.aspx和newform.aspx定义自己的aspx,例如

     <Forms> <Form Type="DisplayForm" Url="DispForm.aspx" SetupPath="pages\\form.aspx" WebPartZoneID="Main" /> <Form Type="EditForm" Url="EditForm.aspx" SetupPath="features\\$SharePoint.Feature.DeploymentPath$\\YourListDefinitionPathInSolution\\YourEditForm.aspx" UseLegacyForm="True" WebPartZoneID="Main" /> <Form Type="NewForm" Url="NewForm.aspx" SetupPath="features\\$SharePoint.Feature.DeploymentPath$\\YourListDefinitionPathInSolution\\YourEditForm.aspx" UseLegacyForm="True" WebPartZoneID="Main" /> </Forms> 

在此博客文章中,您将找到一个很好的秘诀: 创建自定义SharePoint 2010列表表单以在Visual Studio 2010项目中进行部署

问候

编辑:对不起,2010年版本的配方:-(

您所建议的听起来不像是最佳实践,newform.aspx,editform.aspx等是列表的SharePoint即用型表单,应该单独使用。

您正在进行哪些更改? 简单的更改,例如增加文本框的大小还是实质性的更改?

如果更改很大,则可以创建自己的表单

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM