Erik
12/6/2002 6:57:00 AM
Unfortunately, I'm adding the SelectionList dynamically too based on a
previous selection. I don't know if I'm adding 1 or 10 lists until runtime.
If I can't do this, it must be a bug. Items.Add() should always work.
"Pierluigi" <pierluigi@box.it> wrote in message
news:u34gqNJnCHA.392@TK2MSFTNGP09...
> Try to use a static selectionlist (declared at design time) and then add
> items at runtime.
>
> "Erik" <eolson@ArtsAndCraftsFair.com> ha scritto nel messaggio
> news:#QJ1WMBnCHA.1612@TK2MSFTNGP09...
> > I'm having a major problem adding a MobileListItem to a SelectionList
> > object. I need to do this in the code behind, not in the MMIT designer.
> No
> > matter how I try the value of the options alway starts at 0 and
increments
> > up, even when I try to explicitly set as in the below code. Is this a
> bug?
> >
> > --CODE
> > SelectionList sel = new SelectionList();
> > sel.ID = "cmbReps1";
> > MobileListItem _ml = new MobileListItem("text", "value");
> > sel.Items.Add(_ml);
> >
> >
> > --RESULTS
> > <select name="cmbReps1">
> > <option value="0">text
> > </select>
> >
> >
> > The option should render as <option value="value">text.
> >
> >
>
>