Hi it me again. I had produce some codes for my previous qns but it doesn't work, can anyone help me with it?
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs) Handles DataGrid1.ItemCommand
Dim btn As System.Web.UI.WebControls.Button = CType(e.CommandSource, System.Web.UI.WebControls.Button)
Dim userName As System.Web.UI.WebControls.TemplateColumn = CType(e.CommandSource, System.Web.UI.WebControls.TemplateColumn)
Dim name As String = user_name.Text
If name = userName.HeaderText Then
btn.Visible = True
Else
btn.Visible = False
End If
End Sub
This is the code for the button to be visible if the message is post by the member itself. It appear no error but the button doesn't display for the codes above. The button in datagrid , i had choose a push button and set the visible to false.
thankx
tiffany