How to make a link button visible after another button has been clicked i开发者_如何学JAVAn asp.net(vb) in button_click()
it says error as "Object reference not set to an instance of an object."
i've done this in my code
Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs)
Dim receipt As LinkButton = FormView1.FindControl("LinkButton1")
' receipt.Enabled = "true"
' receipt.EnableTheming = "true"
' receipt.EnableViewState = "true"
receipt.Visible = "true"
End Sub
Remove the form name like this:
Dim receipt As LinkButton = FindControl("LinkButton1")
If (Not receipt Is Nothing)
' receipt.Enabled = "true"
' receipt.EnableTheming = "true"
' receipt.EnableViewState = "true"
receipt.Visible = "true"
End if
Or like this...
LinkButton1.Visible = "true"
精彩评论