Bilawal Niaz

Bilawal Niaz

  • NA
  • 110
  • 16.4k

Dropdown inside listview, insert button passing null to db?

Jun 24 2016 12:11 PM
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? 

Answers (1)