Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   DropDownList Problem (http://www.velocityreviews.com/forums/t772399-dropdownlist-problem.html)

radhakrishnan 01-23-2004 04:28 AM

DropDownList Problem
 
Hello All,

In a webform i have one dropdownlist and One textbox

user can select the particular item from the dropdownlist and
enter value in the
textbox.

finally he click submit button the entered data are to stored in
a database.


ex. selection of first item in dropdownlist user enters the
textbox1="HELLO"
selection of second item in dropdown user enters the
textbox1="WELCOME"
Onclicking the submit button HELLO,WELCOME both should to be
stored.

I am making dropdownlist.AutoPostBack="true"
To do this i am using the onselectedindexchanged as given below.

dim htList as new Hashtable
sub change(sender as object,e as eventagrs)
textbox1.text="HELLO"
htList.add(dropdownlist.selectedindex,textbox1.tex t)
end sub

i am using a hash table to store these values. But only the last
selectedindex value is available in hashtable.
Is there any way to get all the values entered by the user
onselecedindexchaged.

thanks in advance





CMA 01-23-2004 05:37 AM

Re: DropDownList Problem
 
when u declare the variable use "Shared"

like
Shared htList as new Hashtable

it will available as static. so make ur life easier...

regards,
CMA



"radhakrishnan" <radhakrishnan.b@in.bosch.com> wrote in message
news:buq7ul$jbh$1@ns2.fe.internet.bosch.com...
> Hello All,
>
> In a webform i have one dropdownlist and One textbox
>
> user can select the particular item from the dropdownlist and
> enter value in the
> textbox.
>
> finally he click submit button the entered data are to stored

in
> a database.
>
>
> ex. selection of first item in dropdownlist user enters the
> textbox1="HELLO"
> selection of second item in dropdown user enters the
> textbox1="WELCOME"
> Onclicking the submit button HELLO,WELCOME both should to be
> stored.
>
> I am making dropdownlist.AutoPostBack="true"
> To do this i am using the onselectedindexchanged as given below.
>
> dim htList as new Hashtable
> sub change(sender as object,e as eventagrs)
> textbox1.text="HELLO"
> htList.add(dropdownlist.selectedindex,textbox1.tex t)
> end sub
>
> i am using a hash table to store these values. But only the last
> selectedindex value is available in hashtable.
> Is there any way to get all the values entered by the user
> onselecedindexchaged.
>
> thanks in advance
>
>
>
>





All times are GMT. The time now is 01:47 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.