I would like to dynamically create a button in the "footer" section of a datagrid. Once this button is created, I would like to wire up an existing event (by another button) to this new dynamically created button.

I have the following code in my Item_DAtabound event of the datagrid.

<code>
If e.Item.ItemType = ListItemType.Footer Then
Dim btnSave2 As System.Web.UI.WebControls.Button = New System.Web.UI.WebControls.Button
e.Item.Cells(10).Controls.Add(btnSave2)
btnSave2.Width.Pixel(105)
btnSave2.Height.Pixel(32)
btnSave2.Text = "Save"
AddHandler btnSave2.Click, AddressOf btnSave_Click
End If
</code>

The button gets displayed, but after it's clicked, it disappears. In addition, it doesn't go into the btnSave_Click event (below):

<code>
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
.
.
.
End sub
</code>

What do I need to do in order to get this to work???