mitesh.24jain 0 Light Poster with c# language
I have 3 table let say table1 ,table2 and table3

Table1 with 2 columns pid and productname

pid(P.k)   productname
    1       abc
    2      qwe    
    3      ewre
    4      jui
Table2 with 2 columns fid and imagename

fid(P.k)    imagename
1            a
2            b
3            c
4            d
5            e
6            f
7            g
8            h
9            i
Table3 with 3 column name id pid whick is foreign key and fid with foreign key of table1 and table2 respectively

id   pid(F.k)   fid(F.k)
1       1             1
2       1             4
3       1             6
4       1             8
5       2.            2
6       2             4

here is my tables which is made on inserting the items of pid

here i want to get all values of table2 in datalist with empty checkbox and at the same time i want to get checkboxsign as tick whose value of fid is asigned in table3 of an particular product pid.


ok assume i have only 2 table Table2 And Table3 as seen above.
now i want all the value of Table2 in datalist having checkbox unchecked with each,...and than i want Table3 value on that datalist with checkbox checked.

In short i want my datalist as

1     checked=true
2     checked=false
3     checked=false
4     checked=true
5     checked=false
6     checked=true
7     checked=false
8     checked=true
9     checked=false

Here 1 2 3 4 5 6 .......9 are the value of Table2 in which matched value of Table3 column name(fid) are assigned to be checked as true and rest of them are assigned to be unchecked.
I m not getting the query.
"select * from Table2" will give whole Table2 but i want also Table3 and want to make checkbox=true when the value of Table2(fid) and Table3(fid matches)

Please help me its very urgent. Thanking you in advance!!

I know that my explanation is not good than also please suggest that how i used to explain.
In advance thankyou to reply me.