Hi
I have the following code in my GridView, I would like to make my linkbutton visible or invisible (depend on action)
please see the following code
Dim CancelButton As LinkButton = CType(Me.grdContacts.FindControl("LinkButton_Cancel"), LinkButton)
Dim DeleteButton As LinkButton = CType(Me.grdContacts.FindControl("LinkButton_Delete"), LinkButton)
CancelButton.Visible = True
DeleteButton.Visible = False
but when I get to CancelButton.Visible = True , I get the following error message.
NullReferenceExeption was unhandled by user code
any help appreciated.
Thanks
I have the following code in my GridView, I would like to make my linkbutton visible or invisible (depend on action)
please see the following code
Dim CancelButton As LinkButton = CType(Me.grdContacts.FindControl("LinkButton_Cancel"), LinkButton)
Dim DeleteButton As LinkButton = CType(Me.grdContacts.FindControl("LinkButton_Delete"), LinkButton)
CancelButton.Visible = True
DeleteButton.Visible = False
but when I get to CancelButton.Visible = True , I get the following error message.
NullReferenceExeption was unhandled by user code
any help appreciated.
Thanks