I wasn't entirely sure on how to do it.
I thought this was the way to do it, as it displayed data in the list when i
tested it. Therefore I just thought that was all the code I needed. Could
you point out what I'm missing?
[quoted text, click to view] "DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:uvgjZMsCFHA.3728@TK2MSFTNGP14.phx.gbl...
> You show all the code except the portion where you are having the problem,
> where you "grab value of the list item".
>
> Can you provide more information?
>
> DalePres
>
>
>
> "Tony Jo" <adslv526@tpg.com.au> wrote in message
> news:42034159$1@dnews.tpgi.com.au...
> > 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
> >
> >
>
>