-3
Protected Sub foo_Click(ByVal sender As Object, ByVal e As CommandEventArgs)
Dim a As LinkButton = CType(Repeater1.FindControl("Linkbutton1"), LinkButton)
a.Enabled = False
End Sub
當我嘗試獲得「對象引用未設置爲對象的實例」。當我點擊鏈接按鈕。當訪問linkbutton獲取「對象引用未設置爲對象的實例」時。
'Repeater1.FindControl(「Linkbutton1」)'可能返回'Nothing'。 –
linkbutton在項目模板中使用。這些值會顯示出來,但是當我點擊它時我會得到這個異常。 –