drop down list

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kalaivanan

    drop down list

    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

  • Ciaran O''Donnell

    #2
    RE: drop down list

    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 " wrote:
    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
    >
    >

    Comment

    • kalaivanan

      #3
      Re: drop down list


      Ciaran O''Donnell wrote:
      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 " wrote:
      >
      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

      Comment

      Working...