[英]How to AsyncPostBackTrigger for the LinkButton in the Repeater
[英]AsyncPostBackTrigger doesn't find LinkButton
我在.aspx文件中有這個代碼
<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
<ContentTemplate>
<asp:PlaceHolder runat="server" ID="Placeholder1" EnableViewState="false"></asp:PlaceHolder>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ShowVotePanelBtn" EventName="ShowVoteClick" />
</Triggers>
</asp:UpdatePanel>
我收到此錯誤: Could not find an event named 'ShowVoteClick' on associated control 'ShowVotePanelBtn' for the trigger in UpdatePanel 'UpdatePanel1'
。
我不明白這個消息。 該控件具有相應的單擊事件。
任何想法?
而是使用:
EventName="Click"
這將引發LinkButton
控件的Click
事件,如其OnClick
屬性所定義。 在您的情況下,您的ShowVoteClick
事件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.