I have 2 tables in database as follows:


id name state id

1 aaa 1,2

2 bbb 1,3


id state

1 ak

2 ny

3 jk

so the problem is that I want to display all the data of "table1" in a gridview and in place of "state id" I want to display "statename", for example in place of "1,2" I want to display "ak,ny".

How to do this?

Please help me.



Thanks for your reply.
Sorry to say that the link you sent does not match my requirement. Actually I am new to asp.net, If you have any other idea for my requirement please reply back.

Thanks again