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

 找回密码
 注册
搜索
打印 上一主题 下一主题

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

[复制链接]
跳转到指定楼层
1#
发表于 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, 2024-4-20 01:16 , Processed in 0.024906 second(s), 13 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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