Skip to content

Dropdown inside listview, insert button passing null to db?

Bilawal Niaz

Asked Jun 24, 2016, 8:11 AM EDT1 answer
Share
LinkedInX
When i apply dropdown list inside the listview they add only null value why?

Currently I have a dropdownlist with it's own sqldatasource that's populating the dropdownlist. The ddl is inside a listviews, which also has it's on sqldatasource, insert item template. However when we click insert the value passed to the dbase is a null.

When i apply single dropdown list using below code they work fine, But when i apply 2 dropdown list, second dropdown inherited with first dropdown they cannot work, They passing out null value.

First dropdown is "Province" and second dropdown is a "City",
When i select Province, than City will be automatically show from database, but when we aplly those dropdown inside listview than they add only null value.

But if i add only Province dropdown, they successfully add data to the db.
 
Why? 

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    The Whole Code Is :
    No data was returned.

    Area Id

    Provience Id

    City Id

    Area Name

    0