Reputation: 43
I have a datalist that looks like this:
<asp:datalist runat="server" ID="dlpreapprovalestimates">
<HeaderTemplate>
<asp:Label ID="lbprearrpovalestcontract" text="Contractor" runat="server"/>
<asp:Label ID="lbprearrpovalestsubmitted" text="Submitted" runat="server"/>
<asp:Label ID="lbprearrpovalestprogcost" text="Prog. Cost" runat="server"/>
<asp:Label ID="lbprearrpovalestowncost" text="Own. Cost" runat="server"/>
<asp:Label ID="lbprearrpovalestcmreview" text="CM Review" runat="server"/>
<asp:Label ID="lbprearrpovalestcityreview" text="City Review" runat="server"/>
</HeaderTemplate>
<ItemTemplate>
<asp:Label ID="lbprearrpovalestcontract" text='<%# Eval("Contractorky") %>' runat="server"/>
<asp:Label ID="lbprearrpovalestsubmitted" text='<%# Eval("DateSubmitted") %>' runat="server"/>
<asp:Label ID="lbprearrpovalestprogcost" text='<%# Eval("ProgramTotal") %>' runat="server"/>
<asp:Label ID="lbprearrpovalestowncost" text='<%# Eval("HOTotal") %>' runat="server"/>
<asp:Label ID="lbprearrpovalestcmreview" text='<%# Eval("CMApprovalDate") %>' runat="server"/>
<asp:Label ID="lbprearrpovalestcityreview" text='<%# Eval("CityApprovalDate") %>' runat="server"/>
</ItemTemplate>
</asp:datalist>
The code behind references it like this:
dlpreapprovalestimates.DataSource = resest.Query.LoadDataTable();
dlpreapprovalestimates.DataBind();
The aspx page has a master page which is in a scriptmanager, but the datalist appears within the content page in the relevant code behind (along with fifty or so other controls, all of which (excluding this one) work.
Intellesense (whatever the thing is called that fills in your typing for you) totally recognizes the existence of this datalist, which is usually not what it will do in the case of a control which isn't populated in the designer page, all the same I've tried to force designer page updates which has had no effect. The out of context error only appears after I attempt to debug, or build (or rebuild) the project.
The datalist is nested in a table, the table is tagged runat server along with a panel it is also nested in (also runat server)
I've looked around for solutions but nothing seems to help on this.
Upvotes: 0
Views: 352
Reputation: 43
Apparently this is already answered, because it was in a table with the runat server it is a nested control and I needed to do a find on it.
Upvotes: 0