16.01.2013 Views

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

Microsoft Sharepoint Products and Technologies Resource Kit eBook

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 35: Building Applications Using Windows SharePoint Services Data 969<br />

The formatting also supports the use of HTML links. (You can see this function<br />

simply by entering http://.) We must warn you, however, if you expose<br />

links to external users, you must consider security. If you do use links, they should<br />

be accessible to anonymous users.<br />

Locate the Windows SharePoint Services Web Part GUID<br />

As you probably know, Windows SharePoint Services <strong>and</strong> SharePoint Portal Server<br />

use system GUIDs to manage Web Parts <strong>and</strong> objects within the environment. In true<br />

object-oriented fashion, this arrangement allows one object to be reused by all users.<br />

In our example, we selected a discussion list that is actually a List View Object.<br />

When we created it, Windows SharePoint Services created a GUID to identify the<br />

settings <strong>and</strong> data we gave it. When the Web Part is rendered on a page, the GUID<br />

is used to get the object <strong>and</strong> then add the settings <strong>and</strong> data to it when it is displayed.<br />

This process is how Windows SharePoint Services keeps track of almost every item<br />

created—from a list to a document library.<br />

As in Windows SharePoint Services <strong>and</strong> SharePoint Portal Server, if we want to<br />

access a Web Part, Web Part data, or both, we also need the GUID because it is the<br />

only way to locate the item we want to access. Using the GUID, we can pursue the<br />

following options:<br />

■ Instantiate the same object on a different page.<br />

■ Use the GUID to instantiate the same object in a different Windows SharePoint<br />

Services site.<br />

■ Use <strong>Microsoft</strong> Office to move data between Windows SharePoint Services Web<br />

Parts <strong>and</strong> Access, Word, <strong>and</strong> Excel.<br />

■ Access the data directly in the content database (as in our example).<br />

There are three ways to get the GUID for a specific Web Part: by using Notepad,<br />

by using FrontPage, or by querying the content database.<br />

To use Notepad to locate a Web Part GUID<br />

1. Open your Web browser, navigate to the site (in our example, http://s2003e:382).<br />

2. Navigate to the new page we created to display the discussion Web Part.<br />

3. Right-click the page, <strong>and</strong> select View Source. This opens the page’s HTML<br />

code in Notepad.<br />

4. In the Edit menu, click Find (or press Ctrl+F) to open the Find dialog box.<br />

5. Search for the title of the Web Part by typing in its name, Problem/Solutions<br />

Knowledge Base.<br />

The first occurrence in the file will be the title assigned to the TD tag; the<br />

next occurrence should be the actual title between tags.

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

Saved successfully!

Ooh no, something went wrong!