I am developing the 3-tier architecture.... I finished my database parts. In my database i have country as a table that contains countrycode,countryname field.I insert some data's in that table.. my problem is i want to show the countrycode items only in presentation layer using dropdownlist..... any body give idea for me..........................
Thanks......
Loading
Amit ChoudharyPosted Mar 15, 2010, 3:33 AM
Here is your code:
Take a dropdownlist on you aspx page
in your code behind write following code on page_load event:
{SqlConnection cn = new SqlConnection("pass your Connction string here");SqlDataAdapter adp = new SqlDataAdapter("select countryid, countryname from countrytable", cn);Please don't forget to mark as answer.SARAVANA PERUMALPosted Mar 13, 2010, 12:02 AM
Amit ChoudharyPosted Mar 12, 2010, 6:11 AM
in asp.net control you can achieve it like this....
Please mark as answer if it helps you.