MOSS 开发点滴记录
1. 在页面上运行服务器端代码
方法:在web.config 中,修改配置:
<PageParserPaths>
<PageParserPath VirtualPath="/SitePages/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
</PageParserPaths>
<PageParserPath VirtualPath="/SitePages/*" CompilationMode="Always" AllowServerSideScript="true" IncludeSubFolders="true" />
</PageParserPaths>
这样就可以在/SitePages/下的aspx页面使用 类似<%= DateTime.Now.ToString() %> 这样的服务器代码了
2. 获取ListItem 的创建时间
item["创建时间"] //SPListItem item