How to add String entry in the dropdown, populated with the integer data?
ASP.NET
2
Posts
2
Posters
0
Views
1
Watching
-
when i try to add the -Select- entry in the dropdown that is populated with the interger data, from the dataset. I'm getting the following error, Expected type is Int32 Any suggestion to work around.
myList.Items.Add(new ListItem("--Select--", 0); will add it but since your binding your better off to draw the DataView and add it there then sort the DataView you just extracted. DataView myDataView = DataTable.DefaultView; I dont use datatables unless my arms are tied behind my back and someone is playing powerpuff girls all day, so the syntax might be wrong. 1 line of code equals many bugs. So don't write any!!