Ajax Performance

Again another post at the Ajax forum. There was a developer who ran into a performance issue with MS Ajax. He had an Updatepanel with a dropdownlist in it which contains 14,000 items. Personally it think that an dropdownlist with 14,000 items isn’t a very good situation and should be avoided when possible. First the developer told me that he couldn’t avoid this situation, because his design matches the business requirements. Finally he choose another solution to workaround this problem.

 

The problem he had wasn’t there when he did the exact same thing without an UpdatePanel. So this shows us that MS Ajax has his problems with the UpdatePanel. Developers can manipulate the process of partial rendering with the PageRequestManager. Take a look at it to see what kind of scenarios you can handle with the PageRequestManager.

Getting a full postback from within an UpdatePanel without using a PostbackTrigger

Hi,

I read a post on the blog of Luis Abreu which is very interesting. It shows what the consequences are if you don’t define a ID on a control and place it in an UpdatPanel. Check it!

ASP.NET AJAX 1.0 source code released

Microsoft has released the source code of server-side ASP.NET AJAX 1.0. take a look at Scott Guthrie’s Blog or download it here.

MS Ajax: RadioButton CheckedChanged not firing back with AJAX v1.0?

I saw a very interesting post on the Ajax forum. NXTwoThou had a problem with 2 radiobutton controls which must fire the OnCheckedChanged event. Here is the code.

        <script runat=”Server”>
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                    ddl_customers_specific.Items.Add(new ListItem(“Test”));
            }
            protected void rb_customers_all_CheckedChanged(object sender, EventArgs e)
            {
                ddl_customers_specific.BackColor = System.Drawing.Color.Red;
            }
            protected void rb_customers_specific_CheckedChanged(object sender, EventArgs e)
            {
                ddl_customers_specific.BackColor = System.Drawing.Color.Blue;
            }
        </script>
        <form id=”form1″ runat=”server”>
            <asp:ScriptManager runat=”server” ID=”sm” />
                 <asp:RadioButton ID=”rb_customers_all” runat=”server” Text=”All Customers” AutoPostBack=”true”
                 Checked=”true” GroupName=”g_Customers” OnCheckedChanged=”rb_customers_all_CheckedChanged” />        
    <asp:RadioButton ID=”rb_customers_specific” runat=”server” Text=”Specific Customers” AutoPostBack=”true” GroupName=”g_Customers” OnCheckedChanged=”rb_customers_specific_CheckedChanged” />
    <asp:UpdatePanel ID=”up_customer” runat=”server” UpdateMode=”conditional”>
                   <ContentTemplate>
                          <asp:DropDownList ID=”ddl_customers_specific” runat=”server” />
                   </ContentTemplate>
                   <Triggers>
                          <asp:AsyncPostBackTrigger ControlID=”rb_customers_all” EventName=”CheckedChanged” />
                          <asp:AsyncPostBackTrigger ControlID=”rb_customers_specific” EventName=”CheckedChanged” />
                   </Triggers>
              </asp:UpdatePanel>
         </form>

     

The problem is that the radio button “rb_customers_all” has the property checked set to true. When this is set to true the event will never get fired. removing this property and adding the following code “rb_customers_all.InputAttributes["checked"] = “true”;” will fix this problem.

Have fun!

Ajax for Web Application Developers

    Hi,Like i already told i’am very interested in the MS Ajax technology. I also knew that this technology wasn’t a new one. So i decided the read a book about Ajax. The book that i found at the local bookstore was: “Ajax for Web Application Developers, Kris Hadlock”.I think that this book gives you a good impression about the Ajax technology and what comes around when you want to use it. When you read this book you also get a little idea what Microsoft already has done for us developers with releasing MS Ajax. I think that this book is very welcome for developers who are starting to work with the Ajax technology. Enjoy it!
    Ajax for Web Application Developers
Follow

Get every new post delivered to your Inbox.