problem using DropDownList in EditItemTemplate

Discussion in 'ASP .Net' started by Jeff, Nov 13, 2008.

  1. Jeff

    Jeff Guest

    hey

    asp.net 2.0

    I'm getting this error message:
    DataBinding: 'CarDetail' does not contain a property with the name
    'Description'.

    <asp:DropDownList ID="ddlCarType" DataTextField='<%# Bind("'Description'")
    %>'
    DataValueField='<%# Bind("Id")%>' DataSourceID="dsdAvtaleType"
    runat="server">
    </asp:DropDownList>

    Description is a property of CarTypeDetail.

    The GridView is using an ObjectDataSource as datasource. the DropDownList is
    using another ObjectDataSource as datasource..

    In addition I'm wondering if the binding to the "Id" can make confusion as
    both CarDetail and CarDetailType has that property

    any suggestions what I do wrong here?

    Jeff
     
    Jeff, Nov 13, 2008
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.