My stored procedure is like this
SELECT Id, StudentName FROM xyz
I have a drop down list in asp.net, which I am loading as :
If you have list of class to fill drop down list, this is probably best to do;
List foo = new List(); ddlFoo.DataSource = foo.Select(x => new ListItem { Text = x.Text1 + " - " + x.Text2, Value = x.Id.ToString() }); ddlFoo.DataBind();