views:

561

answers:

0

I have a Dynamic Data Entities Web Application with ADO.NET Entity Model generated from MS SQL 2005 database with 47 tables and about 30 relationships. All works well except one table, which gives

Object reference not set to an instance of an object.

runtime error when I'm trying to navigate to it from entry page tables' list - Default.aspx

Runtime error appears at Line 25 in the List.aspx markup


Line 23:             <asp:FilterRepeater ID="FilterRepeater" runat="server">
Line 24:                 <ItemTemplate>
Line 25:                     <asp:Label runat="server" Text='<%# Eval("DisplayName") %>' AssociatedControlID="DynamicFilter$DropDownList1" />
Line 26:                     <asp:DynamicFilter runat="server" ID="DynamicFilter" OnSelectedIndexChanged="OnFilterSelectedIndexChanged" />
Line 27:                 </ItemTemplate>


Stack trace is in the P.S. of this message.

Any ideas? (I'm stuck.)

Thank you.

-- P.S.

[NullReferenceException: Object reference not set to an instance of an object.]
   System.Web.DynamicData.MetaColumn.get_Attributes() +30
   System.Web.DynamicData.MetaColumn.RetrieveMetaData() +16
   System.Web.DynamicData.MetaColumn.EnsureMetadata() +60
   System.Web.DynamicData.MetaColumn.get_DisplayName() +12

[TargetInvocationException: Property accessor 'DisplayName' on object 'System.Web.DynamicData.MetaForeignKeyColumn' threw the following exception:'Object reference not set to an instance of an object.']
   System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component) +390
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +84
   System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +92
   System.Web.UI.DataBinder.Eval(Object container, String expression) +106
   System.Web.UI.TemplateControl.Eval(String expression) +40
   ASP.dynamicdata_pagetemplates_list_aspx.__DataBinding__control4(Object sender, EventArgs e) in f:\Dmitry\TEST\WorldRelaxDDEWA\WorldRelaxDDEWA\DynamicData\PageTemplates\List.aspx:25
   System.Web.UI.Control.OnDataBinding(EventArgs e) +99
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.Control.DataBindChildren() +211
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102
   System.Web.UI.Control.DataBind() +15
   System.Web.UI.WebControls.Repeater.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +124
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +443
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +51
   System.Web.UI.WebControls.Repeater.DataBind() +75
   System.Web.DynamicData.FilterRepeater.DataBind() +22
   System.Web.DynamicData.FilterRepeater.Page_InitComplete(Object sender, EventArgs e) +37
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnInitComplete(EventArgs e) +8694646
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +467