I have a repeater in which I have a hidden field (input type =
hidden), a textbox (asp:TextBox), a checkbox (input type = checkbox)
and a label (asp:Label). I have bound all four items to the same bit
field in a dataset, and when the items are first bound, all four are
correctly databound. For example, if the stored procedure returns 1
for the value of the field, the value of the hidden field is True, the
text that appears in the textbox and label is True, and the checkbox
is checked. If I make a change to the value in the database by
unchecking the checkbox and saving, after postback (I do rebind the
repeater), the label text is now False, as it should be, and the
checkbox is unchecked. However, the hidden field value and textbox
text are both still True. I would be extremely grateful if anybody
could explain to me why the hidden field and textbox do not get
updated. I originally only had a hidden field and checkbox, but as I
could not solve why the hidden field value was not updating, I added
the label and textbox to try to aid my investigation. To ensure that
the data being a bit field was not the problem, I produced the same
results using a text field in the stored procedure. EnableViewState is
set to False at the Page level.
hidden), a textbox (asp:TextBox), a checkbox (input type = checkbox)
and a label (asp:Label). I have bound all four items to the same bit
field in a dataset, and when the items are first bound, all four are
correctly databound. For example, if the stored procedure returns 1
for the value of the field, the value of the hidden field is True, the
text that appears in the textbox and label is True, and the checkbox
is checked. If I make a change to the value in the database by
unchecking the checkbox and saving, after postback (I do rebind the
repeater), the label text is now False, as it should be, and the
checkbox is unchecked. However, the hidden field value and textbox
text are both still True. I would be extremely grateful if anybody
could explain to me why the hidden field and textbox do not get
updated. I originally only had a hidden field and checkbox, but as I
could not solve why the hidden field value was not updating, I added
the label and textbox to try to aid my investigation. To ensure that
the data being a bit field was not the problem, I produced the same
results using a text field in the stored procedure. EnableViewState is
set to False at the Page level.
Comment