Can't get asp repeater button to work in ajax panel

4 posts, 0 answers
  1. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 19 Aug 2011 Link to this post

    I have an asp repeater within a rad ajax panel. I get the loading image, but I do not get the text to output test. Here is my code.

    <telerik:RadAjaxPanel ID="RadAjaxPanel2" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <asp:Label ID="output" runat="server"></asp:Label>
        <br />
        <asp:Repeater ID="headRepeat" runat="server">
            <ItemTemplate>
                <div class="headerImageRepeat">
                    <table cellpadding="0" cellspacing="0" style="height: 70px;">
                        <tr>
                            <td style="padding-left: 10px; padding-top: 10px; padding-right: 10px;" valign="top">
                                <asp:Image ID="headerImage" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "headerImageUrl") %>' />
                            </td>
                            <td style="padding-bottom: 5px;" valign="bottom">               
                                <asp:Label ID="headerLabel" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "headerOutput") %>'></asp:Label>
                                <asp:Button ID="updateHours" runat="server" Text="Save" CommandName="updateHours" />
                            </td>
                        </tr>
                    </table>
                </div>
            </ItemTemplate>
        </asp:Repeater>
    </telerik:RadAjaxPanel>


    Private Sub headRepeat_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.RepeaterCommandEventArgs) Handles headRepeat.ItemCommand
     
        '<asp:ImageButton ID="updateHours" runat="server" ImageUrl="../images/save.png" CommandName="updateHours" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>' />
     
        output.Text = "test"
     
        'if they clicked the save in the repeater
        If (e.CommandName.ToString = "updateHours") Then
     
            Response.Write("test")
     
        End If 'if e.commandname
    End Sub
  2. Web Services
    Web Services avatar
    243 posts
    Member since:
    Apr 2008

    Posted 22 Aug 2011 Link to this post

    Any help. I put a break point in at my sub and it does step through it just fine. However, I still don't see that text. I have verified that this stops working as soon as I add the ajax panel. It works fine when I remove the ajax panel. Please help.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 23 Aug 2011 Link to this post

    Hello,

    Note that this is generic Ajax limitation. Unfortunately the MS AJAX  does not support server trace like Server.Execute(), Server.Transfer(), or modifying response with calls to Response.Write(), response filters, HttpModules, etc.
    For more information, please refer to the following link:
    http://www.google.bg/search?hl=en&source=hp&q=response.write+asp.net+ajax&aq=0&aql=&aqi=g6&oq=Response.write+asp.net+&cad


    All the best,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 23 Aug 2011 Link to this post

    Hello,

    Note that this is generic Ajax limitation. Unfortunately the MS AJAX  does not support server trace like Server.Execute(), Server.Transfer(), or modifying response with calls to Response.Write(), response filters, HttpModules, etc.
    For more information, please refer to the following link:
    http://www.google.bg/search?hl=en&source=hp&q=response.write+asp.net+ajax&aq=0&aql=&aqi=g6&oq=Response.write+asp.net+&cad


    All the best,
    Maria Ilieva
    the Telerik team

    Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Back to Top