Re: retrieving the root URL of the current site?
From: Jim Duncan (sorry_at_no.email)
Date: 06/27/04
- Next message: Jim Duncan: "Re: Rights Issue"
- Previous message: Jéjé: "Re: Companyweb doesn't work for network clients (internal)"
- In reply to: Jéjé: "retrieving the root URL of the current site?"
- Messages sorted by: [ date ] [ thread ]
Date: Sat, 26 Jun 2004 20:35:00 -0700
SPWeb myWeb = SPControl.GetContextWeb(Context);
string myLayoutsFolder = myWeb.Url + "_layouts";
"Jéjé" <willgart@BBBhotmailAAA.com> wrote in message
news:ObyA5n7WEHA.2840@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I've a webpart which relay some process to an ASPX page under the
> /_layouts/MyFolder virtual folder.
>
> To keep the right menu at the top of the ASPX page I must call the
_Layouts
> of the right folder.
>
> For example my calling page is in the sub site Toto:
> http://localhost/subsite/toto/mypage.aspx
>
> My webpart creates an hyperlink to the "myprocess.aspx" page:
> http://localhost/_layouts/myfolder/myprocess.aspx
>
> What is missing is the "subsite/toto" information in my URL!
> So the complete URL of the current sub site.
> So I want to link to this page:
> http://localhost/subsite/toto/_layouts/myfolder/myprocess.aspx
>
> How to retrieve the complete URL to call the right _layouts folder?
> (retrieving http://localhost/subsite/toto)
>
> thanks.
>
> Jerome.
>
>
- Next message: Jim Duncan: "Re: Rights Issue"
- Previous message: Jéjé: "Re: Companyweb doesn't work for network clients (internal)"
- In reply to: Jéjé: "retrieving the root URL of the current site?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|