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

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

3 Answers 85 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Web Services
Top achievements
Rank 2
Web Services asked on 19 Aug 2011, 05:29 PM
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

3 Answers, 1 is accepted

Sort by
0
Web Services
Top achievements
Rank 2
answered on 22 Aug 2011, 03:39 PM
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.
0
Maria Ilieva
Telerik team
answered on 23 Aug 2011, 02:27 PM
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 >>

0
Maria Ilieva
Telerik team
answered on 23 Aug 2011, 02:27 PM
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 >>

Tags
Ajax
Asked by
Web Services
Top achievements
Rank 2
Answers by
Web Services
Top achievements
Rank 2
Maria Ilieva
Telerik team
Share this question
or