drop down list

  • Thread starter Thread starter kalaivanan
  • Start date Start date
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
 
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
 
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
 
Back
Top