I have a usercontrol that provides voting buttons (for a voting model of type SO) - it contains a private int member that stores the record identifier. Outside the repeater, it functions normally - it works with return mail, and the correct identifier is stored in the user control.
Inside the repeater, the itemdatabound event handler associates the correct identifier with the usercontrol, and it works correctly - it displays the correct vote count from the database. However, when one of the voting buttons is pressed, it starts the postback to the usercontrol, and the control has lost the contents of its private int element so that it no longer functions.
I tried to both bind the usercontrol to postback, and bind it only to the bootstrap - the problem is the same in both directions.
How to force usercontrol to store the value of this int via postback?
source share