Search code examples
asp.netvb.netrepeater

Reset values inside a repeater


I have a repeater which displays products. Users can select a Size - dropdownlist and an Amount - textbox. Then they press Order or Cancel. When they press Cancel I would like the values of Size and Amount to return to their default values.

Protected Sub lbtnCancel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lbtnCancel.Click
    rpt.ProductList is the repeater name

    lblFeedback.Text = ("")
    lblFeedback.ForeColor = Drawing.Color.Black
End Sub

Any help is welcome!

I am using VB.NET.


Solution

  • What if you rebind your repeater on the Cancel Click, so it will again be populated with your Default Values ?