Web部件添加到SharePoint页面中的ASPX标记
我有拿到一个项目服务器安装目录的布局目录复制一个aspx页面。在ASPX是具有Web部件区域中的Web部件页面。我怎样才能在页面的标记添加Web部件,Web部件区域内?
I have an aspx page that get copied in the layouts directory of a Project Server instalation. The aspx is a web part page that has a web part zone. How can I add a web part in the markup of the page, within the web part zone?
您不能在布局目录自定义的Web部件页面!这仅受存储在文档库或其他文件夹中的SPWeb的Web部件页,即ASPX文件,你可以得到的是spfile引用。在布局目录ASPX页面的Web部件必须添加为在ASPX源Web控件。
You cannot have customizable Web Part pages in the layouts directory! This is only supported on Web Part pages stored in a document library or other folder in an SPWeb, i.e. ASPX files that you can get an SPFile reference to. Web Parts on ASPX pages in the layouts directory must be added as Web controls in the ASPX source.