我想根据CodeBehind文件中编写的代码隐藏和显示。 守则如下:
<div class="actions">
<div class="prebidConfirm">
<asp:LinkButton runat="server" ID="ConfirmLinkButton" OnClick="ConfirmLinkButton_Click"
CssClass="button-go" Text="<%$ Resources: General, Yes %>">
</asp:LinkButton>
</div>
<div class="prebidCancel">
<asp:LinkButton runat="server" ID="CancelLinkButton"
Text="<%$ Resources: General, No %>">
</asp:LinkButton>
</div>
<div class="prebidCancel">
<asp:LinkButton runat="server" ID="OKButton"
Text="<%$ Resources: General, OK%>">
</asp:LinkButton>
</div>
</div>
代码背后的代码如下:
private void SetLocalizedBodyText() {
if (true){
ConfirmLinkButton.Visible = false;
CancelLinkButton.Visible = false;
OKButton.Visible=true
}
}
但是我收到了错误 &#34;未捕获的TypeError:无法读取属性&#39; _events&#39; of null&#34;