Some repeater items not updating when database updates

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cerilocke@googlemail.com

    Some repeater items not updating when database updates

    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.
  • Nathan Sokalski

    #2
    Re: Some repeater items not updating when database updates

    If you could post your code (both the declarative from the *.aspx file and
    the codebehind where you call the DataBind() method), it might help me and
    others help you find your problem.
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。


    <cerilocke@goog lemail.comwrote in message
    news:306654b0-f502-4d8a-b544-e7700b4afa1c@79 g2000hsk.google groups.com...
    >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.

    Comment

    Working...