I have the following case :
a link button
which triggered through AsyncPostBackTrigger
.but still does a full post back !!
<asp:LinkButton ID="lbtnShowNotes" runat="server" CssClass="blue" OnClick="lbtnShowNotes_Click"> <img src="images/document_notes.png"/>notes</asp:LinkButton>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Panel ID="pnlNotes" runat="server" Visible="false">
<asp:Label ID="lbl_title" runat="server" Text="الملاحظات"></asp:Label>
<asp:TextBox ID="txt_Coments" runat="server" Columns="70" Rows="5" TextMode="MultiLine"></asp:TextBox>
<asp:LinkButton ID="lbtnOkNotes" runat="server"><img src="images/tick.png" alt=""/></asp:LinkButton>
<asp:LinkButton ID="lbtnCancelNotes" runat="server" CausesValidation="False" OnClick="lbtnCancelNotes_Click"><img src="images/tick.png" alt=""/></asp:LinkButton>
</asp:Panel>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="lbtnShowNotes" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
Change the UpdatePanel
's UpdateMode
Property to "Conditional".
<asp:UpdatePanel UpdateMode="Conditional" ID="UpdatePanel1" runat="server">
The UpdatePanel
is updated if the UpdateMode
property is set to Conditional
, and one of the following conditions occurs:
UpdatePanel
control. In this scenario, the control explicitly triggers an update of the panel content. The control can be either inside or outside the UpdatePanel control that defines the trigger.