This is probably because you have not set the DataTextField/ DatavalueField property of the dropdownlist.
VB.NET
’..
DropDownList1.DataSource = ds.Tables(0)
DropDownList1.DataTextField = 'CategoryName'
DropDownList1.DataValueField = 'CategoryId'
DropDownList1.DataBind()
C#
//..
DropDownList1.DataSource =ds.Tables[0];
DropDownList1.DataTextField = 'CategoryName';
DropDownList1.DataValueField = 'CategoryId';
DropDownList1.DataBind();
Share with