资讯王 发表于 2011-1-14 08:31:06

[SP] 取SharePoint URL路径方法how to get current URL in SharePoint?

取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
页: [1]
查看完整版本: [SP] 取SharePoint URL路径方法how to get current URL in SharePoint?