I’ve struggling for hours now with this issue. I have a list that I keep in the Session
Session["AllDev"] = taskData.DisplayAllDevelopers();
I use it later this way.
_ddlAllDev.DataSource = (ListItemCollection)Session["AllDev"];
_ddlAllDev.DataBind();
DisplayAllDevelopers() method returns a ListItemCollection. Each ListItem contains the ID of the Developer as Value and the name of the Developer as Text. But When I check the items collection, I find that the DropDownList has both the value and the text set to the name of the devoloper. Is there a way to force the DropDownList to keep the Value and the Text as the source is?
Thanks for helping.
Can also try this