大马资讯论坛 - 马来西亚中文资讯平台

标题: [SP] 取SharePoint URL路径方法how to get current URL in SharePoint? [打印本页]

作者: 资讯王    时间: 2011-1-14 08:31
标题: [SP] 取SharePoint URL路径方法how to get current URL in SharePoint?
[SP] 取SharePoint URL路径方法how to get current URL in SharePoint?

取得路径须用SPContext.Current执行 To get current URL using SPContext.Current use
SPContext.Current.Web.Url //获取当前访问网站的Url / for absolute url
SPContext.Current.ServerRelativeUrl //如果没错的话,是开着的网页路径 / for the relative position of web on site




欢迎光临 大马资讯论坛 - 马来西亚中文资讯平台 (http://www.freeinfo.com.my/) Powered by Discuz! X3.3