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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1004 Part IX: Maintaining a Server in Windows SharePoint Services<br />

page is rendered by the SafeMode parser that is part of the Web Part infrastructure.<br />

The following steps are taken during this page rendering process:<br />

■ Retrieves the page’s collection of Web Parts, determines whether the page is in<br />

personal or shared view, <strong>and</strong> resolves personalization <strong>and</strong> customization considerations.<br />

■ Verifies that every part in a Web Part Zone is in the SafeControls list. If a page<br />

is parsed by the SafeMode parser all server controls, even those that are not a<br />

part of a Web Part Zone, are validated against the SafeControls list, which is<br />

located in the Web.config file.<br />

After this, the infrastructure creates each Web Part until all the parts are rendered<br />

on the page <strong>and</strong> the page is returned to the requestor.<br />

Web Part Rendering<br />

Rendering a Web Part is h<strong>and</strong>led by the st<strong>and</strong>ard ASP.NET rendering process. The<br />

Render method of the WebPart class is inherited from the System.Web.UI.Control<br />

class <strong>and</strong> is used by the <strong>Microsoft</strong>.SharePoint.WebPartPages.WebPart base class to<br />

add the frame around the content provided by the Web Part. The Render method<br />

also calls the RenderWebPart method so the Web Part can generate the HTML that is<br />

rendered inside the Web Part frame. Although the Render method on the base class<br />

is defined as overridable, it is not recommended that you do so. Instead, implement<br />

any rendering for the Web Part in the RenderWebPart method. The entire rendering<br />

process is shown in Figure 37-1.<br />

ASPX Page<br />

Web Part<br />

F37xr01.bmp<br />

Figure 37-1 Rendering Web Part Pages <strong>and</strong> Web Parts<br />

Page States Explained<br />

Request<br />

ASP.NET starts<br />

page render<br />

WebPart.Render()<br />

CustomPart.RenderWebPart()<br />

We have seen that Web Part Pages can be in different states. The main reasons for<br />

SharePoint to store some templates in the file system (ghosted) <strong>and</strong> some in the<br />

database (unghosted) have to do with security <strong>and</strong> scalability.

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

Saved successfully!

Ooh no, something went wrong!