开发者

Reset values inside a repeater

开发者 https://www.devze.com 2023-03-08 10:26 出处:网络
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 A

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.


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


Use the rptProductList_ItemCommand event to catch the repeateritem line and play with the controls as you please ...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号