开发者

How to make a link button visible after another button has been clicked in asp.net(vb) in button_click()

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"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜