Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i m maintaning two data base tables
table1 for the drop down it contains some id's like : infosys by clicking the infosys it should check with the table 2 and generate the employees for infosys all details in grid view. how its possible.
Posted

1 solution

C#
string strsql=string.empty;
strsql="select * from table2 where id1=@dropdownvalue1";
//write code for executing a query
cmd.parameter.addwithvalue(@dropdownvalue1,dropdownlistvalue1);
//write code for filling dataset here
if(ds.Tables[0].rows.count>0)
{
//bound gridview here
}



Thanks
 
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