在 ItemUpdated 事件中访问 FormView

Access FormView in the ItemUpdated event

当我想像下面这样修改 FormView 元素时,它在 DataBound 事件中工作正常,但它不适用于 ItemUpdated 事件(也不适用于 ItemUpdating 事件)。这是为什么?

这个有效

Protected Sub FormView1_DataBound(ByVal sender As Object, ByVal e As System.EventArgs) Handles FormView1.DataBound        
    cType(sender.FindControl("myField"),TextBox).text="Some value"  
End Sub

这不行

Protected Sub FormView1_ItemUpdated(ByVal Sender As Object, ByVal e As FormViewUpdatedEventArgs) Handles FormView1.ItemUpdated
    cType(sender.FindControl("myField"),TextBox).text="Some value"  
End Sub

似乎在 FormView.ItemUpdated 事件之后有一个 FormView.DataBound 事件,导致了这个。