i don't know javascript aside from the occasional alert function. but isn't it possible to create an array of an array in js? if so, I would think it would be possible then.
Main Topics
Browse All TopicsHi Experts,
i am developing a page in which i have filled COMBO1 with Products and COMBO 2 with its sizes(based on the selection made in combo 1)..
i used the following code:
FOR COMBO 1:
Private Sub GetProduct()
Dim AdminCmd As SqlCommand
Dim AdminReader As SqlDataReader
con = New SqlConnection(Configuratio
con.Open()
AdminCmd = New SqlCommand("EXEC stp_PROD_GetProducts", con)
AdminReader = AdminCmd.ExecuteReader
cmbProduct.DataSource = AdminReader
cmbProduct.DataValueField = "ProductID"
cmbProduct.DataTextField = "Product"
cmbProduct.DataBind()
con.Close()
End Sub
FOR COMBO2:
Private Sub GetSizeCategoryByProductID
Dim AdminCmd As SqlCommand
Dim AdminReader As SqlDataReader
con = New SqlConnection(Configuratio
con.Open()
AdminCmd = New SqlCommand("EXEC stp_SIZE_GetSizeCategories
AdminReader = AdminCmd.ExecuteReader
cmbSizeCategory.DataSource
cmbSizeCategory.DataValueF
cmbSizeCategory.DataTextFi
cmbSizeCategory.DataBind()
con.Close()
End Sub
The problem is that the code is working but it submits page everytime i made selection in COMBO1.i want to fill second combo without submitting the page..is there any javascript or anyother way to do this..i have done this in ASP using javascript but can any1 guide or provide me to do this in asp.net on client side.i dont want to submit the page
i hope u guys got the point..
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
im not so good at javascript either.. but it is an option, to store the values to an object..array maybe and then reload the content of the 2nd combo box using that array?
but with the complications, i believe it would have been better if you just allow it to postback than go into the difficulties of this javascript approach. if your options are numerous, you would be sending unnecessary information to the user (sending all the options for the 2nd combo box)
of course, i could be wrong.so i have to be honest that i would suggest hanging around for other expert answers..c",)
but do you badly need to avoid postback? coz in my experience, even big companies, who dynamically populate combo boxes based on other combo boxes use postback or activeX or if they do it with javascript, they still re-communicate with the server.you might get stuck with worrying too much about postback, but the solution you might be looking into would actually be more complicated..c",) just some reminders..c",)
Business Accounts
Answer for Membership
by: steelheart38Posted on 2005-09-15 at 13:21:56ID: 14893111
unfortunate, you cannot perform database queries with client side scriptng. so there is no way you could dynamically populate your combo box 2 without sending data back to the server
how did you do it in javascript for ASP? you were querying a database from javascript?