Home > Archive > microsoft.public.cert.exam.mcsd > March 2004 > To capture the list item in drop down





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author To capture the list item in drop down
Puneet Malhotra

2004-03-26, 11:24 am

hi all,

I have created a dropdownlist control and populating the drop downs. now I
have assigned the values to each of the value appearing in the dropdown. I
want to accessthose and pass this to my query that value. every time I do
that it passes just one value.
no idea what to do?

please help

Puneet


DalePres

2004-03-26, 11:24 am

Are you trying to pass all of the values to the query? If so you can't pass
an array or collection to a query. You would have to iterate through the
list and use a StringBuilder to create a delimited string. Then you can
pass the delimited string to your query and parse it in your stored
procedure. You ARE using a stored procedure, right???

Dale

"Puneet Malhotra" <puneetmalhotra@bigfoot.com> wrote in message
news:e%23g8JP0EEHA.2524@TK2MSFTNGP09.phx.gbl...
> hi all,
>
> I have created a dropdownlist control and populating the drop downs. now

I
> have assigned the values to each of the value appearing in the dropdown. I
> want to accessthose and pass this to my query that value. every time I do
> that it passes just one value.
> no idea what to do?
>
> please help
>
> Puneet
>
>



Puneet Malhotra

2004-03-26, 12:24 pm

no, I am not passing all the values, but just want to pass value of that
which is selected in the dropdownlist.
just struggling with that right now..
it might be very easy but I have just started it. please help

thanks
Puneet


"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:uL1tES0EEHA.1092@TK2MSFTNGP12.phx.gbl...
> Are you trying to pass all of the values to the query? If so you can't

pass
> an array or collection to a query. You would have to iterate through the
> list and use a StringBuilder to create a delimited string. Then you can
> pass the delimited string to your query and parse it in your stored
> procedure. You ARE using a stored procedure, right???
>
> Dale
>
> "Puneet Malhotra" <puneetmalhotra@bigfoot.com> wrote in message
> news:e%23g8JP0EEHA.2524@TK2MSFTNGP09.phx.gbl...
now[color=blue]
> I
I[color=blue]
do[color=blue]
>
>



Brunswick Lowe

2004-03-26, 3:24 pm

Not sure I follow the question, but here goes. Each item in the list has a
display member and a value member. As the names would indicate, the display
member is show, and the value member is the value associated with that item
(that which would likely be passed to your query). If you need certain
values associated with an item, that goes in the display member. For
example, you show "Tennessee" but the value is "TN." So Tennessee is the
display member and TN is the value member.

Hope that helps. Somebody pipe in if that's not right.

B
"Puneet Malhotra" <puneetmalhotra@bigfoot.com> wrote in message
news:e%23g8JP0EEHA.2524@TK2MSFTNGP09.phx.gbl...
> hi all,
>
> I have created a dropdownlist control and populating the drop downs. now

I
> have assigned the values to each of the value appearing in the dropdown. I
> want to accessthose and pass this to my query that value. every time I do
> that it passes just one value.
> no idea what to do?
>
> please help
>
> Puneet
>
>



Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net