drop down list

K

kalaivanan

hi,
i am developing web application using c#.
in a particular page i am using two drop down list boxes, one for
product and the other for corresponding models of a product. whenever i
select a product the corresponding models will be populated in the
model drop down list. and i am using ajax for populating the model ddl.
hence the model ddl will be populated at the client. now when i do my
processing using the datum in the page i am getting the error
object reference not set to an instance of an object.

i think i am not able to read data at server which is populated at
client.
what is the solution fot this problem?

kalaivanan
 
G

Guest

Dont read the selected item from the drop down list. Get the selected item
from the form data (Request.Form["ddlname"]). The ddl wont automatically know
what was selected as it didnt originally send down the data that has been
selected. You may be able to fill it will a complete list of models on
Page_Init in order for it to be able to pick but using the form data is quite
easy and definately works.

Ciaran O'Donnell
 
K

kalaivanan

Ciaran said:
Dont read the selected item from the drop down list. Get the selected item
from the form data (Request.Form["ddlname"]). The ddl wont automatically know
what was selected as it didnt originally send down the data that has been
selected. You may be able to fill it will a complete list of models on
Page_Init in order for it to be able to pick but using the form data is quite
easy and definately works.

Ciaran O'Donnell

kalaivanan said:
hi,
i am developing web application using c#.
in a particular page i am using two drop down list boxes, one for
product and the other for corresponding models of a product. whenever i
select a product the corresponding models will be populated in the
model drop down list. and i am using ajax for populating the model ddl.
hence the model ddl will be populated at the client. now when i do my
processing using the datum in the page i am getting the error
object reference not set to an instance of an object.

i think i am not able to read data at server which is populated at
client.
what is the solution fot this problem?

kalaivanan
thanks man. it works
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top