开发者

Updating button text when FormView item is Updated

I'm still somewhat new to ASP, and can't seem to figure out what the issue is.

When I update an item in FormView, I need the text of a button to change.

I'm using:

Protected Sub fvClientInfo_ItemUpdated(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewUpdatedEventArgs) Handles fvClientInfo.ItemUpdated
    btnEditClient.Text = "Edit"
End Sub

The line of code is being called (can tell from debug mode), but the button text isn't changing and I have no idea why.

I should make sure to开发者_高级运维 mention that the button is NOT inside the FormView.

Any ideas?


Try this.

Protected Sub btnchange() Handles FormView1.DataBound
    Button1.Text = "Newtxt"
End Sub

and add this to your formview

OnDataBound="btnchange"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜