13.07.2015 Views

Microsoft SharePoint. Building Office 2007 Solutions in VB 2005 ...

Microsoft SharePoint. Building Office 2007 Solutions in VB 2005 ...

Microsoft SharePoint. Building Office 2007 Solutions in VB 2005 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 9 ■ SHAREPOINT AND MICROSOFT OFFICE 33311. Click the Add button.12. When the new page opens, add the bolded code <strong>in</strong> List<strong>in</strong>g 9-1 to the page. This codeadds references to the <strong>SharePo<strong>in</strong>t</strong> object model and then uses the object model to getthe address for each site <strong>in</strong> the collection. The address is then displayed <strong>in</strong> a new<strong>in</strong>stance of a mobile L<strong>in</strong>k control. I cover the <strong>SharePo<strong>in</strong>t</strong> object model <strong>in</strong> detail <strong>in</strong>Chapter 11.List<strong>in</strong>g 9-1. A Mobile Home PagePublic Sub Page_Load()Dim site As SPSite = SPControl.GetContextSite(Context)Dim webs As SPWebCollection = site.AllWebsFor Each web As SPWeb In websNextEnd SubDim webL<strong>in</strong>k As L<strong>in</strong>k = New L<strong>in</strong>kwebL<strong>in</strong>k.NavigateUrl = web.Url & _"/_layouts/mobile/default.aspx"webL<strong>in</strong>k.Text = web.TitleWelcomeForm.Controls.Add(webL<strong>in</strong>k)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!