I have a Listbox that users can select multiple values. Selection Mode =
Multiple.
The multiple values are associated with one record. I need to insert into
the database like this:
Erik San Diego
Erik San Francisco
Erik Sacramento
How can I find out what the selection value is if they picked more than one.
Thanks.
Big Edim i as integer
for i = 1 to listbox1.items.count
if listbox1.items(i-1).selected = true then
do stuff
end if
next
"Big E" <nospam@.nospam.com> wrote in message
news:Ouqa50JVEHA.2320@.TK2MSFTNGP10.phx.gbl...
> I'm using ASP.Net and SQL Server 2000.
> I have a Listbox that users can select multiple values. Selection Mode =
> Multiple.
> The multiple values are associated with one record. I need to insert into
> the database like this:
> Erik San Diego
> Erik San Francisco
> Erik Sacramento
> How can I find out what the selection value is if they picked more than
one.
> Thanks.
> Big E
How would I use this with a stored procedure that has parameters? Where
would I stick this?
Thanks.
Big E
MyCommand.SelectCommand.Parameters.Add(New SqlParameter("@.QuestionId",
SqlDbType.Int))
MyCommand.SelectCommand.Parameters("@.QuestionId").Value = txtQuestionId.Text
"Steve Caliendo" <scaliendo@.epion.com> wrote in message
news:u7trHmKVEHA.2972@.TK2MSFTNGP12.phx.gbl...
> dim i as integer
> for i = 1 to listbox1.items.count
> if listbox1.items(i-1).selected = true then
> do stuff
> end if
> next
>
> "Big E" <nospam@.nospam.com> wrote in message
> news:Ouqa50JVEHA.2320@.TK2MSFTNGP10.phx.gbl...
> > I'm using ASP.Net and SQL Server 2000.
> > I have a Listbox that users can select multiple values. Selection Mode =
> > Multiple.
> > The multiple values are associated with one record. I need to insert
into
> > the database like this:
> > Erik San Diego
> > Erik San Francisco
> > Erik Sacramento
> > How can I find out what the selection value is if they picked more than
> one.
> > Thanks.
> > Big E
0 comments:
Post a Comment