Ambinkknono
New Member
I am trying to populate aspropDownList with data items and here is the code i have written so far.aspx side\[code\]<aspropDownList ID="ddl" runat="server" />\[/code\]C# side\[code\]protected void btnAdd_Click(object sender, EventArgs e){ ddl.DataTextField = "hello"; ddl.DataTextField = "2"; ddl.DataBind();}\[/code\]The method \[code\]btnAdd_Click\[/code\] is invoked. I tested it. But the data list is not getting populated with those data items.