dr
is an
SqlDataReader[
^], right?
Its
Item[
^] property is indexed. Indexes in C# are given in square brackets like here
li.Value = dr.Item[0];
For the other part, I can only guess that
l
is of type
System.Web.UI.Controls.ListItem[
^]. Its
Value[
^] property is of type
System.String[
^], just as the other property you set. Therefore you cannot assign a zero to it (the parentheses do exactly nothing here). Use
l.Value = "0";
instead. Or, if the zero represents a variable, use that variable's
ToString[
^] overload.