Click here to Skip to main content
15,891,409 members
Articles / Programming Languages / C#

WebParticles: Developing and Using Web User Controls as WebParts in Microsoft Office SharePoint Server 2007

Rate me:
Please Sign up or sign in to vote.
4.90/5 (61 votes)
27 Mar 200714 min read 510.9K   1.1K   165  
Using Web User Controls in SharePoint WebParts
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="SmartParticles._Default" %>

<%@ Register Assembly="SmartParticles" Namespace="SmartParticles" TagPrefix="cc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:WebPartManager ID="WebPartManager1" runat="server">
        </asp:WebPartManager>
    
    </div>
        <asp:WebPartZone ID="WebPartZone1" runat="server" BorderColor="#CCCCCC" Font-Names="Verdana"
            Height="197px" Padding="6" Width="554px">
            <PartChromeStyle BackColor="#F7F6F3" BorderColor="#E2DED6" Font-Names="Verdana" ForeColor="White" />
            <MenuLabelHoverStyle ForeColor="#E2DED6" />
            <EmptyZoneTextStyle Font-Size="0.8em" />
            <MenuLabelStyle ForeColor="White" />
            <MenuVerbHoverStyle BackColor="#F7F6F3" BorderColor="#CCCCCC" BorderStyle="Solid"
                BorderWidth="1px" ForeColor="#333333" />
            <HeaderStyle Font-Size="0.7em" ForeColor="#CCCCCC" HorizontalAlign="Center" />
            <ZoneTemplate>
                <cc1:webparticle id="WebParticle1" runat="server"></cc1:webparticle>
            </ZoneTemplate>
            <MenuVerbStyle BorderColor="#5D7B9D" BorderStyle="Solid" BorderWidth="1px" ForeColor="White" />
            <PartStyle Font-Size="0.8em" ForeColor="#333333" />
            <TitleBarVerbStyle Font-Size="0.6em" Font-Underline="False" ForeColor="White" />
            <MenuPopupStyle BackColor="#5D7B9D" BorderColor="#CCCCCC" BorderWidth="1px" Font-Names="Verdana"
                Font-Size="0.6em" />
            <PartTitleStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.8em" ForeColor="White" />
        </asp:WebPartZone>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Architect Dell
United States United States
I am a Big Data Architect working with MPP Database Systems and Hadoop.

Comments and Discussions