Hi,
I em using a asp.net webcontrol having two buttons and onclick of a button i em displaying the custom server control which is created using asp.net.I used AJAX so that the page does not reload when buttons are clicked. Check out the code below:
<%@ Register Assembly="abc" Namespace="abc"
TagPrefix="cc1" %>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
</Triggers>
<asp:ImageButton ID="Button1" runat="server" Height="25px" Width="100px" OnClick="Button1_Click"
ImageUrl="~/Images/button1.png" />
<asp:ImageButton ID="Button2" runat="server" Height="25px" Width="100px" OnClick="Button2_Click"
ImageUrl="~/Images/button2.png" />
<asp:Panel ID="Panel1" runat="server">
<cc1:test1 ID="test1" runat="server" />
<cc1:test2 ID="test2" runat="server" />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
Here,First time the Page.IsPostBack is false.However when i click the button Page.IsPostBack becomes true.Can anyone help me how can I force Page.IsPostBack to be false always?
Regards,
Mishal