Search code examples
asp.netthemes

Compilation Error after deoplyment. Doesn't recognize 'Theme' attribute


My local copy works fine, then I publish the website and I get this error.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30456: 'Theme' is not a member of 'ASP.invoice_aspx'.

Source Error:

Line 1: <%@ page title="Invoice" language="VB" masterpagefile="~/MasterPage.master" autoeventwireup="false" inherits="Invoice, App_Web_1d5eb-af" theme="Default" %>

Line 2:

Line 3: <asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">

Source File: C:\Inetpub\eSolutions_xyAMP_DEV\Invoice.aspx Line: 1

What is going on here?

HTML SOURCE

<%@ Page Title="Invoice" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Invoice.aspx.vb" Inherits="Invoice" Theme="Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table style="width:100%;">    
        <tr>
            <td align="center">
                <asp:panel id="pnl"   runat="server"
                Width="992px" Wrap="False" HorizontalAlign="Center"  >
                <asp:Button id="btnPrepareInvoice" runat="server"   Text="Trial Invoice"  ></asp:Button>
                <asp:Button id="btnFinalize" runat="server"   Text="Final Invoice"   ></asp:Button>
                </asp:panel>
             </td>
        </tr>
    </table>
    <br />
    <table width="100%"> 
        <tr>
        <td     class="Subhdr" align="center" >
            <asp:Label ID="Label7" Cssclass="ScreenHdr"  runat="server" Font-Bold="True"  
            Font-Size="Medium"   Height="24px" 
                  Width="221px">Issued Contracts</asp:Label>
             </td>
             </tr>
             </table>
             <asp:datagrid id="dgrContracts"  
                runat="server" HorizontalAlign="Center"  BorderColor="#C0C0FF" 
        ForeColor="Blue" Font-Size="8pt" Font-Bold="True" BorderWidth="1px" 
        BorderStyle="Solid" Font-Names="Arial"
                  ShowFooter="True" OnPageIndexChanged="IssueDataGrid_Page" 
        OnSortCommand="IssueDataGrid_Sort" AllowPaging="True" CellPadding="2" 
        GridLines="Horizontal" AutoGenerateColumns="False"
                AllowSorting="True" OnItemCommand="IssueDataGrid_Command" Width="100%">
                <FooterStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Top"></FooterStyle>
                <SelectedItemStyle Wrap="False" BackColor="#E0E0E0"></SelectedItemStyle>
                <EditItemStyle Wrap="False"></EditItemStyle>
                <AlternatingItemStyle Font-Size="8pt" Font-Bold="True" Wrap="False" HorizontalAlign="Left" Height="18px"
                    BorderWidth="1px" ForeColor="#0000C0" BorderStyle="Solid" BorderColor="#C0C0FF" VerticalAlign="Middle"
                    ></AlternatingItemStyle>
                <ItemStyle Font-Size="8pt" Font-Names="Arial" Font-Bold="True" Wrap="False" HorizontalAlign="Left"
                    Height="18px" ForeColor="#0000C0" VerticalAlign="Middle"></ItemStyle>
                <HeaderStyle Font-Size="8pt" Font-Names="Arial" Font-Bold="True" Wrap="False" HorizontalAlign="Left"
                    Height="18px" ForeColor="White" BackColor="Blue"></HeaderStyle>
                <Columns>
                    <asp:TemplateColumn>
                        <ItemTemplate>
                            <asp:Button id="btnSelect" runat="server" Width="13px" BackColor="Yellow" ForeColor="White"
                                Height="13px" CommandName="Select"></asp:Button>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn DataField="MBI_Selected"></asp:BoundColumn>
                    <asp:BoundColumn DataField="CUST_CombinedNumber" SortExpression="CUST_CombinedNumber" HeaderText="Number">
                        <HeaderStyle Width="60px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="CUST_Name" SortExpression="CUST_Name" HeaderText="Name" HeaderStyle-Width="110px" />
                    <asp:BoundColumn DataField="DisplayDate" SortExpression="MBI_Date" HeaderText="Effective">
                        <HeaderStyle Width="80px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="VEHL_Year" HeaderText="Year">
                        <HeaderStyle Width="30px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="DisplayMake" HeaderText="Make">
                        <HeaderStyle Width="100px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="VEHL_Model" HeaderText="Model">
                        <HeaderStyle Width="120px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="MBI_PlanCode" HeaderText="Plan">
                        <HeaderStyle Width="30px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="DisplayExchangePrice" HeaderText="Exch">
                        <HeaderStyle Width="30px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="MBI_DlrCost" HeaderText="Cost" DataFormatString="{0:C}">
                        <HeaderStyle Width="30px"></HeaderStyle>
                    </asp:BoundColumn>
                </Columns>
                <PagerStyle VerticalAlign="Top" NextPageText="&gt;&gt;&gt;&gt;" Height="18px" PrevPageText="&lt;&lt;&lt;&lt;"
                    HorizontalAlign="Left" ForeColor="White" BackColor="Blue" Wrap="False"></PagerStyle>
            </asp:datagrid>

              <table width="100%"> 
        <tr>
        <td     class="Subhdr" align="center" >
            <asp:Label ID="Label1" Cssclass="ScreenHdr"  runat="server" Font-Bold="True"  
            Font-Size="Medium"   Height="24px" 
                  Width="221px">Cancelled Contracts</asp:Label>
             </td>
             </tr>
             </table>

             <asp:datagrid id="dgrCancels"  
                runat="server" HorizontalAlign="Center"   BorderColor="#C0C0FF" 
        ForeColor="Blue" Font-Size="8pt" Font-Bold="True" BorderWidth="1px" 
        BorderStyle="Solid" Font-Names="Arial"  PageSize="5" ShowFooter="True" OnPageIndexChanged="CancelDataGrid_Page"
                OnSortCommand="CancelDataGrid_Sort" AllowPaging="True" CellPadding="2" 
        GridLines="Horizontal" AutoGenerateColumns="False" AllowSorting="True" 
        OnItemCommand="CancelDataGrid_Command" Width="100%">
                <FooterStyle Wrap="False" HorizontalAlign="Left" VerticalAlign="Top"></FooterStyle>
                <SelectedItemStyle Wrap="False" BackColor="#E0E0E0"></SelectedItemStyle>
                <EditItemStyle Wrap="False"></EditItemStyle>
                <AlternatingItemStyle Font-Size="8pt" Font-Bold="True" Wrap="False" HorizontalAlign="Left" Height="18px"
                    BorderWidth="1px" ForeColor="#0000C0" BorderStyle="Solid" BorderColor="#C0C0FF" VerticalAlign="Middle"
                    ></AlternatingItemStyle>
                <ItemStyle Font-Size="8pt" Font-Names="Arial" Font-Bold="True" Wrap="False" HorizontalAlign="Left"
                    Height="18px" ForeColor="#0000C0" VerticalAlign="Middle"></ItemStyle>
                <HeaderStyle Font-Size="8pt" Font-Names="Arial" Font-Bold="True" Wrap="False" HorizontalAlign="Left"
                    Height="18px" ForeColor="White" BackColor="Blue"></HeaderStyle>
                <Columns>
                    <asp:TemplateColumn>
                        <ItemTemplate>
                            <asp:Button id="btnCancelSelect" runat="server" Width="13px" BackColor="Yellow" ForeColor="White"
                                Height="13px" CommandName="Select"></asp:Button>
                        </ItemTemplate>
                    </asp:TemplateColumn>
                    <asp:BoundColumn Visible="False" DataField="CNCL_ID">
                        <HeaderStyle Width="0px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="CNCL_Selected"></asp:BoundColumn>
                    <asp:BoundColumn DataField="CUST_CombinedNumber" SortExpression="CUST_CombinedNumber" HeaderText="Number">
                        <HeaderStyle Width="60px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="CUST_Name" SortExpression="CUST_Name" HeaderText="Name">
                        <HeaderStyle Width="200px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="DisplayIssueDate" SortExpression="MBI_Date" HeaderText="Effective">
                        <HeaderStyle Width="80px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="DisplayCancelDate" HeaderText="Cancel">
                        <HeaderStyle Width="80px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="MBI_Miles" HeaderText="Effective">
                        <HeaderStyle Width="60px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="CNCL_CancelMiles" HeaderText="Cancel">
                        <HeaderStyle Width="60px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="MBI_Price" HeaderText="Price" DataFormatString="{0:C}">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="CNCL_CalculatedNetRefund" HeaderText="Price Refund" DataFormatString="{0:C}">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="MBI_DlrCost" HeaderText="Cost" DataFormatString="{0:C}">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </asp:BoundColumn>
                    <asp:BoundColumn DataField="CNCL_CalculatedNetAdminRefund" HeaderText="Cost Refund" DataFormatString="{0:C}">
                        <HeaderStyle Width="40px"></HeaderStyle>
                    </asp:BoundColumn>
                </Columns>
                <PagerStyle VerticalAlign="Top" NextPageText="&gt;&gt;&gt;&gt;" Height="18px" PrevPageText="&lt;&lt;&lt;&lt;"
                    HorizontalAlign="Left" ForeColor="White" BackColor="Blue" Wrap="False"></PagerStyle>
            </asp:datagrid>
              <asp:Label ID="Errormsg" runat="server" ForeColor="#CC0000"  ></asp:Label>
</asp:Content>

Solution

  • I figured my problem here. I had a class named "Invoice" on my dbml as well as a page named "Invoice.aspx". This is a WebSite Project as opposed to a WebApplication so .net was correct in saying "Compiler Error Message: BC30456: 'Theme' is not a member of 'ASP.invoice_aspx'." blah blah. I wonder why this doesn't show up locally. This site was working fine on my local box, this was showing up after publishing the site to a server. Anyways, this is now working. I just renamed the aspx page and repubbed. <~~if thats a word. lol

    Thanks, ~ck in San Diego