AjaxManager not working

2 posts, 0 answers
  1. TIM
    TIM avatar
    17 posts
    Member since:
    Oct 2011

    Posted 25 Apr 2012 Link to this post

    Hello, I've seemed to always have issues with ajaxing my pages using the AjaxManager.

    In 2 of my pages, they are pretty straight forward. In one page I did get it to work, but now it appears it doesn't want to work at all. It's doing normal postbacks(reloading the page) which is screwing with the results.

    On Page 1:
    I have a grid that I am using a item template on to add a textbox:
    <telerik:GridTemplateColumn FilterControlAltText="Filter Size_Small column"
        HeaderText="S" UniqueName="Size_Small" DataField="Size_Small">
            <telerik:RadTextBox ID="txt_Small" runat="server" Width="25" MaxLength="4" Text="0" ></telerik:RadTextBox>

    I also have a standard label on the page named lbl_Brand.

    For TESTING purposes, I put up a button (button1) and made the following code in it:

    For Each item As GridDataItem In grid_Colors.MasterTableView.Items
        Dim txtbox As RadTextBox = item("Size_Small").FindControl("txt_Small")
        lbl_Brand.Text = item("ColorName").Text & " : Small: " & txtbox.Text

    As per this, it should display the ColorName(It works even though i didn't include code), and then it ALWAYS returns Small: 0. It's returning the DEFAULT value of that textbox.

    So, I am trying to ajax it so it doesn't reload the page on me, here is the code:

    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                                            <telerik:AjaxSetting AjaxControlID="Button1">
                                                    <telerik:AjaxUpdatedControl ControlID="lbl_Brand"
                                                        UpdatePanelRenderMode="Inline" />

    As you can see, I have Button1 setup to update lbl_Brand which is what should display the value. However, this is causing the page to reload.

    Is there a certain process to adding the ajaxmanager and using it? Like, does it's location in the html matter? Does it need to be in a certain framework? Etc.
  2. TIM
    TIM avatar
    17 posts
    Member since:
    Oct 2011

    Posted 25 Apr 2012 Link to this post

    I figured out my ajax issue, i had the scriptmanager after all the components. I was unaware i needed to do it before.
Back to Top