Partager via


ASP.NET 2.0 #8: WebPart Page Sample

<%@ Page Language="C#" MasterPageFile="~/Masters/Interior.master" CompileWith="Dashboard.aspx.cs" ClassName="Dashboard_aspx" Title="Business Intelligence Dashboard" %>
<%@ Register tagprefix="ctl" TagName="ReportControl" Src="../CustomControls/ReportDisplay.ascx"%>
<asp:Content ContentPlaceHolderID="InteriorContentPlaceHolder" Runat=server ID="InteriorContent">
<asp:WebPartManager ID="PartManager" Runat=server />
<table width="100%" >
<tr>
<td width="100%" align="right" colspan="2">
<asp:WebPartPageMenu
ID="PageMenu"
Runat="server"
Text="<%$ Resources:Strings, PagePersonalizationCaption %>"
DropDownAutoPostBack="true"
DropDownButtonText="">
<MenuStyle CssClass="Menu" />
</asp:WebPartPageMenu>
</td>
</tr>
<tr>
<td width="70%">
<table width="100%">
<tr>
<td>
<table border="1px" bordercolor="black" cellpadding="5px" >
<tr>
<td bordercolor=white >
<asp:WebPartZone
ID="YearZone"
Runat="server"
PartChromeType="TitleAndBorder"
DragHighlightColor="Black"
Padding="5"
HeaderStyle-CssClass="ColouredHeading"
CssClass="Normal"
MenuStyle-Font-Names="Arial"
MenuStyle-BackColor="#006633"
MenuStyle-ForeColor="White"
MenuVerbStyle-ForeColor="White"
MenuStyle-BorderColor="Black"
MenuStyle-BorderStyle="Solid"
MenuStyle-BorderWidth="1px"
MenuStyle-Font-Bold="true"
MenuStyle-Font-Size="Smaller"
MenuLabelStyle-ForeColor="White"
MenuStyle-CssClass="NormalPlain"
LayoutOrientation="Horizontal"
HeaderText="<%$ Resources:Strings, YearZoneCaption %>"
>
<CloseVerb ImageUrl="/images/Saler/close.gif" />
<MinimizeVerb ImageUrl="/images/Saler/minimize.gif" />
<EditVerb Text="<%$ Resources:Strings, Edit %>" />
<PartTitleStyle CssClass="ColouredHeading" />
<ZoneTemplate>
<ctl:ReportControl Runat="server" ID="Revenue2000ReportDisplay" Report="C:\apps\Saler\Reports\Revenue2000.rpt" Title="FY '00" />
<ctl:ReportControl Runat="server" ID="Revenue2001ReportDisplay" Report="C:\apps\Saler\Reports\Revenue2001.rpt" Title="FY '01" />
<ctl:ReportControl Runat="server" ID="Revenue2002ReportDisplay" Report="C:\apps\Saler\Reports\Revenue2002.rpt" Title="FY '02" />
</ZoneTemplate>
</asp:WebPartZone>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table border="1px" bordercolor="black" cellpadding="5px" >
<tr>
<td bordercolor="white">
<asp:WebPartZone
ID="ProductsZone"
Runat="server"
LayoutOrientation="Vertical"
BorderStyle="solid"
BorderColor="Black"
BorderWidth="1px"
PartChromeType="TitleAndBorder"
DragHighlightColor="Black"
Padding="5"
HeaderStyle-CssClass="ColouredHeading"
CssClass="Normal"
MenuStyle-Font-Names="Arial"
MenuStyle-BackColor="#006633"
MenuStyle-ForeColor="White"
MenuVerbStyle-ForeColor="White"
MenuStyle-BorderColor="Black"
MenuStyle-BorderStyle="Solid"
MenuStyle-BorderWidth="1px"
MenuStyle-Font-Bold="true"
MenuStyle-Font-Size="Smaller"
MenuLabelStyle-ForeColor="White"
MenuStyle-CssClass="NormalPlain"
HeaderText="<%$ Resources:Strings, ChartZoneCaption %>"
>
<CloseVerb ImageUrl="/images/Saler/close.gif" />
<MinimizeVerb ImageUrl="/images/Saler/minimize.gif" />
<EditVerb Text="<%$ Resources:Strings, Edit %>" />
<PartTitleStyle CssClass="ColouredHeading" />
<ZoneTemplate>
<ctl:ReportControl Runat="server" ID="SaltedNibblersRevenueReportDisplay" Report="C:\apps\Saler\Reports\SaltedNibblers.rpt" Title="Salted Nibblers Revenue" />
<ctl:ReportControl Runat="server" ID="SaltyRodsRevenueReportDisplay" Report="C:\apps\Saler\Reports\SaltyRods.rpt" Title="Salty Rods Revenue"/>
<ctl:ReportControl Runat="server" ID="SaltyTwistsRevenueReportDisplay" Report="C:\apps\Saler\Reports\SaltyTwists.rpt" Title="Salty Twists Revenue" />
<ctl:ReportControl Runat="server" ID="UnsaltedNibblersRevenueReportDisplay" Report="C:\apps\Saler\Reports\UnsaltedNibblers.rpt" Title="Unsalted Nibblers Revenue"/>
<ctl:ReportControl Runat="server" ID="UnsaltedRodsRevenueReportDisplay" Report="C:\apps\Saler\Reports\UnsaltedRods.rpt" Title="Unsalted Rods Revenue"/>
<ctl:ReportControl Runat="server" ID="UnsaltedTwistsRevenueReportDisplay" Report="C:\apps\Saler\Reports\UnsaltedTwists.rpt" Title="Unsalted Twists Revenue"/>
</ZoneTemplate>
</asp:WebPartZone>
</td>
</tr>
</table>
</td>
</tr>
</table>

</td>
<td width="30%" valign="top" align="right">
<table >
<tr>
<td align="left">
<asp:CatalogZone ID="CatalogZone"
HeaderCloseVerb-ImageUrl="/images/Saler/Close.gif"
BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
Runat="server"
HeaderStyle-CssClass="ColouredHeading"
FooterStyle-CssClass="Normal"
AddVerb-Text="<%$ Resources:Strings, Add %>"
CloseVerb-Text="<%$ Resources:Strings, Close %>"
HeaderText="<%$ Resources:Strings, CatalogCaption %>"
>
<PartTitleStyle CssClass="HighlightedHeading" />
<PartStyle CssClass="Normal" />
<CloseVerb ImageUrl="/images/Saler/Close.gif" />
<AddVerb ImageUrl="/images/Saler/Add.gif" />
<CatalogItemStyle CssClass="Normal" BorderStyle="None" />
<ZoneTemplate>
<asp:PageCatalogPart ID="PageCatalog" BorderStyle="None" CssClass="Normal" Runat="server" Title="<%$ Resources:Strings, CatalogListCaption %>" />
</ZoneTemplate>
</asp:CatalogZone>
</td>
<td valign="top" align="left">
<asp:EditorZone ID="EditorZone" Runat="server" HeaderStyle-CssClass="ColouredHeading" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
HeaderCloseVerb-ImageUrl="/images/Saler/Close.gif" InstructionText="<%$ Resources:Strings, EditZoneInstruction %>" EditUIStyle-CssClass="Normal"
ApplyVerb-Text="<%$ Resources:Strings, Apply %>"
OKVerb-Text="<%$ Resources:Strings, OK %>"
CancelVerb-Text="<%$ Resources:Strings, Cancel %>"
>
<VerbStyle CssClass="Normal" />
<InstructionTextStyle CssClass="Normal" />
<PartTitleStyle CssClass="NormalPlain" />
<LabelStyle CssClass="Normal" />
<ZoneTemplate>
<asp:AppearanceEditorPart Runat=server ID="AppearanceEditorPart" CssClass="NormalPlain" />
<asp:LayoutEditorPart Runat=server ID="LayoutEditorPart" CssClass="NormalPlain" />
<asp:BehaviorEditorPart Runat=server ID="BehaviorEditorPart" CssClass="NormalPlain" />
</ZoneTemplate>
</asp:EditorZone>
</td>
</tr>
</table>
</td>
</tr>
</table>
</asp:Content>

Comments