After i declare this, this is the error i get
protected void Page_Load(object sender, EventArgs e)
{
List<String> LabelTextList = new List<String>();
dr = cmd.ExecuteReader();
while (dr.Read())
{
LabelTextList.add(dr[0].ToString());
}
}
Error 1 'MasterPage_Profile' does not contain a definition for 'LabelTextList' and no extension method 'LabelTextList' accepting a first argument of type 'MasterPage_Profile' could be found (are you missing a using directive or an assembly reference?)
[UPDATE] Now it says :
'System.Collections.Generic.List' does not contain a definition for 'add' and no extension method 'add' accepting a first argument of type 'System.Collections.Generic.List' could be found (are you missing a using directive or an assembly reference?)
LabelTextList
is different thanlabelTextList
– JaredPar