Static Web Parts
Static Web Parts are Web Parts that are placed directly on a Web Part page rather than contained in a Web Part zone. These parts are added to Web Part pages by developers at design time—the page layout and properties are fixed by the designer of the part and they cannot be minimized or closed, nor can their properties be modified in the browser. A static Web Part and its properties are stored in the Web Part page (the .aspx file), not the Microsoft® Windows® SharePoint™ Services database, since property values do not change.
When creating static Web Parts, you can define default property values in either of the following ways:
As an attribute of the part.
For example:
<MyTag:MyControl zip="98112" runat="server"/>
places a part on the page and sets the zip property to 98112. All other properties take their default values.
In an outer Web Part tag.
For example,
<MyTag:MyControlTitle="Outer Title" webpart="true" runat="server"> < WebPart xmlns="http://schemas.microsoft.com/WebPart/v2"> <Title>Inner Title</Title> <WebPart> </MyTag:MyControl>
Note In this example, Title is defined in an outer Web Part tag, but note that, in this case, the inner XML contained in the DWP file overrides any attributes declared on the outer tag. Here, the Web Part title will be "Inner Title".
Static Web Parts must be included inside a <form runat=server> tag; otherwise, an exception is raised.