System.MissingMemberException was not handled by user code

I am 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 for dataset

and I am taking 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 do not know what's going on?

Any help please.

Thanks who tried to solve this problem but I got the solution:

through '<%# DataBinder.Eval(Container.DataItem,"ImageURL") %>'

instead '<%# Container.DataItem("RateID") %>'

Thanks,

+2


a source to share


1 answer


Thanks who tried to solve this, but I got the solution:

through '<%# DataBinder.Eval(Container.DataItem,"ImageURL") %>'



instead '<%# Container.DataItem("RateID") %>'

Thanks,

+2


a source







All Articles