I seem to be having a problem when I have a RadAjaxPanel that contains a submit button. Whenever that submit button is click, Page_load gets fired twice. First time around IsPostBack is false, then it gets call the second time around where IsPostBack is true. When I took that button outside of the RadAjaxPanel, then IsPostBack is working properly.
In otherwords, i need to have a way of differentiating if it's a Ajax Request.
Please advice.
In my aspx page, i have the following sample:-
<telerik:RadAjaxPanel runat="server" ID="RadTestPanel" Width="100%"> |
<asp:Button ID="btnTest" runat="server" Text="Add" Font-Names="Calibri" |
Width="60px" OnClick="btnTest_Click" /> |
</telerik:RadAjaxPanel> |
Now in my code behind i have the following...
protected override void Page_Load(object sender, EventArgs e) |
{ |
if (!this.IsPostBack) //Problem lies here such that it's always false when click within the RadAjaxPanel and get's called twice. Why is that? |
{ |
DoSomeFirstTimeInitialization(); |
} |
} |