all groups > c# > november 2006 >
You're in the

c#

group:

drop down list


drop down list kalaivanan
11/12/2006 10:19:22 PM
c#:
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
RE: drop down list Ciaran O''Donnell
11/13/2006 1:32:01 AM
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

[quoted text, click to view]
Re: drop down list kalaivanan
11/13/2006 2:59:31 AM

[quoted text, click to view]
AddThis Social Bookmark Button