System.MissingMemberException was unhandled by user code
Posted
by AmRoSH
on Stack Overflow
See other posts from Stack Overflow
or by AmRoSH
Published on 2010-04-28T14:34:22Z
Indexed on
2010/04/28
14:53 UTC
Read the original article
Hit count: 284
I'm using this code:
Dim VehiclesTable1 = dsVehicleList.Tables(0)
Dim VT1 = (From d In VehiclesTable1.AsEnumerable _
Select VehicleTypeName = d.Item("VehicleTypeName") _
, VTypeID = d.Item("VTypeID") _
, ImageURL = d.Item("ImageURL") _
, DailyRate = d.Item("DailyRate") _
, RateID = d.Item("RateID")).Distinct
its linq to dataset
and I Take Data on THis Rotator:
<telerik:RadRotator ID="RadRotatorVehicleType" runat="server" Width="620px" Height="145"
ItemWidth="155" ItemHeight="145" ScrollDirection="Left" FrameDuration="1" RotatorType="Buttons">
<ItemTemplate>
<div style="text-align: center; cursor: pointer; width: 150px">
<asp:Image ID="ImageVehicleType" runat="server" Width="150" ImageUrl='<%# Container.DataItem("ImageURL") %>' />
<asp:Label ID="lblVehicleType" runat="server" Text='<%# Container.DataItem("VehicleTypeName") %>'
Font-Bold="true"></asp:Label>
<br />
<asp:Label ID="lblDailyRate" runat="server" Text='<%# Container.DataItem("DailyRate") %>'
Visible="False"></asp:Label>
<input id="HiddenVehicleTypeID" type="hidden" value='<%# Container.DataItem("VTypeID") %>'
name="HiddenVehicleTypeID" runat="server" />
<input id="HiddenRateID" type="hidden" value='<%# Container.DataItem("RateID") %>'
name="HiddenRateID" runat="server" />
</div>
</ItemTemplate>
<ControlButtons LeftButtonID="img_left" RightButtonID="img_right" />
</telerik:RadRotator>
and I got this Exception:
No default member found for type 'VB$AnonymousType_0(Of Object,Object,Object,Object,Object)'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.MissingMemberException: No default member found for type 'VB$AnonymousType_0(Of Object,Object,Object,Object,Object)'.
I don't know whats up ?
Any help please.
Thanks for who tried to solve this but I got solution:
using '<%# DataBinder.Eval(Container.DataItem,"ImageURL") %>'
instead of '<%# Container.DataItem("RateID") %>'
Thanks,
© Stack Overflow or respective owner