I was trying to populate a dropdown list control on an web page using VS 2008 and keep getting an error that it can't load the DataContext while using Dynamic Data while using it with linqdatasource.
issue i found was the use of DataContext without its namespace so when used with namespace it was resolved like
<asp:LinqDataSource ID="LinqDataSource1" runat="server"ContextTypeName="MyNameSpace.MyDataContext" TableName="MyTable"> </asp:LinqDataSource>
instead of
<asp:LinqDataSource ID="LinqDataSource1" runat="server"ContextTypeName="MyDataContext" TableName="MyTable"> </asp:LinqDataSource>
issue i found was the use of DataContext without its namespace so when used with namespace it was resolved like
<asp:LinqDataSource ID="LinqDataSource1" runat="server"ContextTypeName="MyNameSpace.MyDataContext" TableName="MyTable"> </asp:LinqDataSource>
instead of
<asp:LinqDataSource ID="LinqDataSource1" runat="server"ContextTypeName="MyDataContext" TableName="MyTable"> </asp:LinqDataSource>
No comments:
Post a Comment