Click here to Skip to main content
16,004,782 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two table named brand(id,name,img) and product (prd_id,name,brand_id).i have a grid in which colom are (prd_id,prd_name,brand_name).now i want to show brand_name in gridview basis of other table brand( brand_id)?
Posted

1 solution

Hi,

Please write a query

Select p.prd_id,p.prd_name,b.name from product p inner join brand b on p.brand_id = b.id

fetch this data to dataset and bind to gridview.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900