Listview and unbound control values
-
I have a listview in which i definited a layout and item template. in the item template there is a checkbox that isn't bound to any data. it's there for me to check the code-behind which rows were selected or not. however, on postback, the checkbox's checked property always comes back false. i tried using a radio button just to test with, and the results were the same. the changed values of unbound controls inside my asp.net listview control do not get carried over. is there a setting or some way for me to get this done ?
-
I have a listview in which i definited a layout and item template. in the item template there is a checkbox that isn't bound to any data. it's there for me to check the code-behind which rows were selected or not. however, on postback, the checkbox's checked property always comes back false. i tried using a radio button just to test with, and the results were the same. the changed values of unbound controls inside my asp.net listview control do not get carried over. is there a setting or some way for me to get this done ?
Check this article it is using grid view control and java script for keeping the state of check boxes. Maintaining States of Selected CheckBoxes in Different Pages
-
Check this article it is using grid view control and java script for keeping the state of check boxes. Maintaining States of Selected CheckBoxes in Different Pages
you know i tried something like that, using jquery though to set the hidden field value when the checkbox was clicked. i think the problem was that i had the hidden field in the listview. I'll trying placing it outside the listview templates and see if that works