Re: Newbie combo question
From: Shawn (bossman100_at_hotmail.com)
Date: 01/18/05
- Next message: Karl Seguin: "Re: Recommended rich text editor"
- Previous message: flex: "New Cracked Software(cad,cae,cam,eda,pcb,gis,cfd,cnc...)"
- In reply to: Nick: "Re: Newbie combo question"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 18 Jan 2005 13:43:43 +0100
If you are using .NET Framework 1.1 then you can use:
myDropDownList.SelectedValue
In .NET Framework 1.0 you can use SelectedIndex and then do a search for
your value, like this:
myDropDownList.SelectedIndex =
myDropDownList.Items.IndexOf(myDropDownList.Items.FindByValue(myValue))
or
myDropDownList.SelectedIndex =
myDropDownList.Items.IndexOf(myDropDownList.Items.FindByText(myText))
Hope this helps,
Shawn
"Nick" <Nick@NTWorks.no.spam.fsnet.co.uk> wrote in message
news:uwNcZdV$EHA.1188@tk2msftngp13.phx.gbl...
> I mean this one:
> System.Web.UI.WebControls.DropDownList
>
> Nick
>
> "Shawn" <bossman100@hotmail.com> wrote in message
> news:ubG7qYV$EHA.1904@TK2MSFTNGP14.phx.gbl...
> > Arrest me if I'm wrong, but from what I know there is no ComboBox
> > available
> > in ASP.NET
> > Are you using a Custom Control?
> >
> > Shawn
> >
> >
> > "Nick" <Nick@NTWorks.no.spam.fsnet.co.uk> wrote in message
> > news:eNGWFRV$EHA.3840@tk2msftngp13.phx.gbl...
> >> Hi - I've loaded the values into a combo box at runtime, but can't see
> >> how
> > I
> >> set the combo to a certain value when the page loads. (The value will
> > change
> >> depending on other variables when the page loads.)
> >>
> >> Thanks
> >>
> >> Nick
> >>
> >>
> >
> >
>
>
- Next message: Karl Seguin: "Re: Recommended rich text editor"
- Previous message: flex: "New Cracked Software(cad,cae,cam,eda,pcb,gis,cfd,cnc...)"
- In reply to: Nick: "Re: Newbie combo question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|