I have 2 tables:
carType:
==
id
CarTypeTitle
and
Items
==
id
ItemTitle
CarTypeId1
CarTypeId2
CarTypeId3
as you can see, i made relationship between CarTypeId (from Items table) to id (CarType Table), and relatshionship between CarTypeId2 (from Items table) to id (CarType table)... and so on.
i have 2 dropdownlist, ddl1, ddl2. ddl1 for carTypes, and ddl2 for items. i succeed with the cascading and that's work great with WHERE parameter at ddl2:
<asp:LinqDataSource ID="LinqDataSource4" runat="server" ContextTypeName="DataClassesDataContext" EntityTypeName="" TableName="Items" Where="CarTypeId1 == @CarTypeId1">
<WhereParameters>
<asp:ControlParameter ControlID="ddl2" Name="CarTypeId" PropertyName="SelectedValue" Type="Int32" />
</WhereParameters>
</asp:LinqDataSource>
when i choose cartype the ddl2 give me In accordance the item for cartypeid1. but how i write the code (WHERE parameter) that will give me the type2 and 3.
i have some items that related to the same cartype, i.e: Wiper-bla is related to subaro and to fiat... so i give them the cartypeid of subaro and fiat...
hope that's all is clear.