I have a asp.net web application. In my .aspx
page I have a update panel in which I have 3 asp:LinkButton
that should make a call to a c# code behind. The problem is that the onclick doesn't work.
Here is how the code looks:
<div id="div1">
<asp:UpdatePanel ID="UpdatePanel2" runat="server">
<ContentTemplate>
<ul>
<li><asp:LinkButton ID="lnk_1" runat="server" OnClick="lnk1_Click">Link1</asp:LinkButton></li>
<li><asp:LinkButton ID="lnk_2" runat="server" OnClick="lnk2_Click">Link2</asp:LinkButton></li>
<li><asp:LinkButton ID="lnk_3" runat="server" OnClick="lnk3_Click">Link3</asp:LinkButton></li>
</ul>
<div> some more code here </div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="lnk_1" />
<asp:PostBackTrigger ControlID="lnk_2" />
<asp:PostBackTrigger ControlID="lnk_3" />
</Triggers>
</asp:UpdatePanel>
</div>
What is wrong with the code? I have also tried using AsyncPostBackTrigger
but still doesn't work.
The code behind is not invoked at all.
I have also tried to search on Google but couldn't find a solution.