Set Dropdownlist value in listview on itemdatabound

Posted by Samir on Stack Overflow See other posts from Stack Overflow or by Samir
Published on 2010-04-01T13:01:55Z Indexed on 2010/04/01 13:03 UTC
Read the original article Hit count: 421

Filed under:
|
|

hello, i have dropdownlist of year which is coming dynamically.i have filled the dropdownlist using object datasource.on inserting in the listview control it is working fine. but when i click on edit button that dropdownlist value should be set which is coming from the database. e.g. if i have a row which contains Year=2006 and month="Jan" then on click on edit button these dropdown list should be fill up.

i have written the code in ItemDataBound to set the value of the dropdownlilst.but when i use findcontrol its taking null so object reference error is coming. so please provide me the solution.

thanks

samir

© Stack Overflow or respective owner

Related posts about listview

Related posts about ASP.NET