This is a migrated thread and some comments may be shown as answers.

RadAjaxManager performs a standard postback every second request

2 Answers 56 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Adrian
Top achievements
Rank 1
Adrian asked on 26 Apr 2010, 01:21 PM

Hi,
I have a really simple scenario here where i have a button in a panel of which is then ajaxified with the radajaxmanager as below. The problem i see here is that every second postback a standard (non-asyncronous) postback is occurring as shown by the IsAjaxRequest property being displayed in the alert.  Is there something really obvious i am missing here ?

Thanks

Ady


public partial class WebForm2 : System.Web.UI.Page 
    { 
     
        Panel panel; 
        Button button; 
 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            AddControls();   
        } 
 
 
        void AddControls() 
        { 
            //Create controls 
            panel = new Panel(); 
            button = new Button { Text = "Update" }; 
            
 
            //Add event handler 
            button.Click += new EventHandler(button_Click); 
 
            //Add controls 
            Form.Controls.Add(panel); 
           
            panel.Controls.Add(button); 
 
            //Register with manager 
           
            RadAjaxManager1.AjaxSettings.AddAjaxSetting(panel, button, null); 
        } 
 
        void button_Click(object sender, EventArgs e) 
        { 
            RadAjaxManager1.Alert(RadAjaxManager1.IsAjaxRequest.ToString()); 
        } 
 
 
    } 

2 Answers, 1 is accepted

Sort by
0
Adrian
Top achievements
Rank 1
answered on 26 Apr 2010, 02:55 PM
My mistake! I forgot to add the control ID's when creating the controls !
0
Jeremy
Top achievements
Rank 1
answered on 31 May 2011, 09:03 AM
Just had the same problem but mine was caused by having the ajaxmanager inside of the div I was updating.
Tags
Ajax
Asked by
Adrian
Top achievements
Rank 1
Answers by
Adrian
Top achievements
Rank 1
Jeremy
Top achievements
Rank 1
Share this question
or