RadAjaxManager performs a standard postback every second request

3 posts, 0 answers
  1. Adrian
    Adrian avatar
    81 posts
    Member since:
    Aug 2006

    Posted 26 Apr 2010 Link to this post


    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. Adrian
    Adrian avatar
    81 posts
    Member since:
    Aug 2006

    Posted 26 Apr 2010 Link to this post

    My mistake! I forgot to add the control ID's when creating the controls !
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jeremy
    Jeremy avatar
    96 posts
    Member since:
    Mar 2010

    Posted 31 May 2011 Link to this post

    Just had the same problem but mine was caused by having the ajaxmanager inside of the div I was updating.
Back to Top