T
Tony Jo
Hi
I'm new to ASP.NET and I have recently had trouble with DropDownLists. I am
binding the list using the following code:
DataSet ds = new DataSet();
adapter.Fill (ds,"Table");
availBeds.DataSource = ds.Tables[0];
availBeds.DataTextField =
ds.Tables[0].Columns["bedname"].ColumnName.ToString();
availBeds.DataValueField =
ds.Tables[0].Columns["bid"].ColumnName.ToString();
availBeds.DataBind();
It seems to work fine, but when I try to grab value portion of the list
item, it doesn't seem to work. I even tried storing the value in a temporary
string data type and then displaying it in a label, but the label does not
display anything. I have tried searching for examples, but most sites show
examples using XML or just simply show the basics.
Is there anything that I missed? Any help would be appreciated.
Thanks in advance
Tony
I'm new to ASP.NET and I have recently had trouble with DropDownLists. I am
binding the list using the following code:
DataSet ds = new DataSet();
adapter.Fill (ds,"Table");
availBeds.DataSource = ds.Tables[0];
availBeds.DataTextField =
ds.Tables[0].Columns["bedname"].ColumnName.ToString();
availBeds.DataValueField =
ds.Tables[0].Columns["bid"].ColumnName.ToString();
availBeds.DataBind();
It seems to work fine, but when I try to grab value portion of the list
item, it doesn't seem to work. I even tried storing the value in a temporary
string data type and then displaying it in a label, but the label does not
display anything. I have tried searching for examples, but most sites show
examples using XML or just simply show the basics.
Is there anything that I missed? Any help would be appreciated.
Thanks in advance
Tony