formview please urgent help
i have a formview with the edit, delete and new buttons. i want to make the property of lifeupload to be visible when the user click the edit or insert button???? how to make that as i wrote the following code but it did not work for me:
Protected Sub FormView1_ItemCommand(ByVal sender As Object, ByVal e As FormViewCommandEventArgs)
If (e.CommandName.Equals("Edit")) Then
'Page.Button1.Visible = True
CType(Page.FindControl("Button1"), Button).Visible = True
ElseIf (e.CommandName.Equals("New")) Then
Button1.Visible = True
End If
End Sub
regards
|