开发者

How to get main site url inside webpart?

开发者 https://www.devze.com 2022-12-19 20:24 出处:网络
I need to get main site开发者_开发问答 url from inside my custom webpart. Is there any programming way to do it?Try :

I need to get main site开发者_开发问答 url from inside my custom webpart. Is there any programming way to do it?


Try :

        SPWeb currentWeb = SPContext.Current.Web;
        SPWeb rootWeb = currentWeb.Site.RootWeb;
0

精彩评论

暂无评论...
验证码 换一张
取 消