Link to home
Start Free TrialLog in
Avatar of AVARICESOFT
AVARICESOFTFlag for Pakistan

asked on

how to add data in dropdown using database using C#.net

hello,

i know its a easy question but i would to know .. please write the code..

i want to know how could i select the one row from database and insert it into my dropdown.. using C#.net

suppose:
query str = "select customerName from Customer where id=" '+custId+' "=customerId";

i want to select those customers whoz id is same which i pass via parameter and check the database id.. kindly give the code..

thanks..
ASKER CERTIFIED SOLUTION
Avatar of muhammadyasir
muhammadyasir
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Change Select query to your querylike this:
select customerName from Customer where id=' "'+custId+" ' ";

Open in new window