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

 找回密码
 注册
搜索

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

[复制链接]
发表于 2011-1-14 08:31:06 | 显示全部楼层 |阅读模式
[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

手机版|大马资讯论坛  

GMT+8, 2022-5-21 20:32 , Processed in 0.040294 second(s), 12 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表