[SharePoint Tip] Create the 'Up to portal' link: the right way!#

I’ve been looking at this for an hour, wondering what I did wrong:

I’ve created a new SPSite using a site definition. I wanted to connect this SPSite to the portal using the PortalUrl and PortalName properties, so the ‘Up to portal’ link would appear.

SPSite newSite = siteCollections.Add(strUrl,strTitle,"",1043,strTemplate,strUserLogin,strUserName,strUserEmail);
newSite.AllowUnsafeUpdates = true;
newSite.PortalName = "My Portal";
newSite.PortalUrl = "http://myserver/";

No error so far, and this is what the SDK was telling me...at least I thought. The link however, never appeared on my new created site. Ok, what was wrong with my code?

newSite.PortalUrl = "http://myserver/";
newSite.PortalName = "My Portal";

This was wrong.. just switch these two lines of code. Why? No clue. Maybe mention this in the SDK? For now, just my two cents (and an hour). With thanks to Arnold.

Wednesday, August 31, 2005 6:31:24 AM UTC #     | 

 

All content © 2012, Mart Muller
On this page
This site
Calendar
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
Archives
Sitemap
Disclaimer

Powered by: newtelligence dasBlog 1.9.7174.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail

Theme design by Jelle Druyts