| Author: Vijay Kumar Naidu 09 Aug 2007 | Member Level: Gold | Rating:  Points: 2 |
Hi,
DropdownList drp = new DropdownList();
... // Code for fetching data while(dr.Read()) { for(int i=1; i<=3;i++) drp.Items.Add(" "); //Add No. of Spaces drp.Items.Add(dr[0].ToString()); }
...// Rest of the code.
this.form1.Controls.Add(drp); // Add the Dropdownlist on the page.
Please revert back if your question is still unanswered.
-Vijay Kumar.
|