开发者

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

开发者 https://www.devze.com 2022-12-30 02:37 出处:网络
How to make alink button visible after another button has been clicked i开发者_如何学JAVAn asp.net(vb) inbutton_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

精彩评论

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