views:

49

answers:

2

i have set of link buttons outside update panel

but when click any one of them they donot work at all , when i set the postbackUrl they make

full postback

my source code :

<asp:Panel ID="pnl_viewImages" runat="server">

                        <asp:Label ID="lbl_viewImages" runat="server" style="texalign: left" 
                            Text="view images :"></asp:Label>
                        <br />
                        <br />
                        <br />

                        <table cellpadding="0" cellspacing="0" style="width: 100%" class ="Alternating">
                            <tr>
                                <td colspan="5">

                                    <asp:UpdatePanel ID="updatePnl_image" runat="server">
                                        <ContentTemplate>
                                            <asp:ListView ID="lv_showImages" runat="server">
                                                <ItemTemplate>
                                                    <asp:Image ID="img_showNewsImage0" runat="server" Height="300px" 
                                                        ImageUrl='<%# "RetreiveImage.ashx" %>' Width="413px" />
                                                </ItemTemplate>
                                            </asp:ListView>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="lbtn_first" EventName="Click" />
                                            <asp:AsyncPostBackTrigger ControlID="lbtn_last" EventName="Click" />
                                            <asp:AsyncPostBackTrigger ControlID="lbtn_next" EventName="Click" />
                                            <asp:AsyncPostBackTrigger ControlID="lbtn_previous" EventName="Click" />
                                            <asp:AsyncPostBackTrigger ControlID="lbtn_delete" EventName="Click" />
                                        </Triggers>
                                    </asp:UpdatePanel>

                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:LinkButton ID="lbtn_first" runat="server" onclick="lbtn_first_Click">first</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbtn_previous" runat="server" onclick="lbtn_first_Click">&lt;&lt;</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbtn_next" runat="server" onclick="lbtn_first_Click" 
                                        >&gt;&gt;</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbtn_last" runat="server" onclick="lbtn_first_Click">last</asp:LinkButton>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbtn_delete" runat="server" onclick="lbtn_first_Click">delete</asp:LinkButton>
                                </td>
                            </tr>
                        </table>
                        <br />
                    </asp:Panel>`

i tried to remove the table but in vain it does not work also.

A: 

You need to put the LinkButtons in the UpdatePanel or put them in their own UpdatePanel.

o6tech
i put them in the update panel but they don't work also
A: 

You appear to be missing a ScriptManger defined before your update panel such as

<asp:ScriptManager ID="ScriptManager1" runat ="server"></asp:ScriptManager>

I think that is probably causing your problem.

Controls outside of the panel can invoke a partial postback.

Paul

Paulie Waulie
no i didn't but i use proxy instead as i used Rad script manager as follows `<table style="width: 100%" class="Alternating">` `<tr>` `<td>` `<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">` `</telerik:RadScriptManager>` </td> </tr> <tr> <td> <asp:Panel id ="pnl_viewNews" runat ="server"> <asp:Label ID="lbl_viewNews" runat="server" Text="view news :"></asp:Label>``<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">``</asp:ScriptManagerProxy>`
I'm not to sure what the problem could be as I've never used any telerik controls. You could try posting your question in their forums if you have not already. I have done what you're trying to do multiple times with a standard script manager and an update panel with the trigger defined as you have. Couple of other things to check: In you web.config do you xhtmlConformance mode="Legacy" as this will disable script managers and do you have a httpModule node for the ScriptModule type = System.Web.Handlers.ScriptModule, System.Web.Extensions? Good luck and sorry couldn't be mroe help.
Paulie Waulie
I use generic handler to bind on the image in the listview , and the handler write stream , is there any conflicts between AJAX concept and streaming or generic handler
I'm not entirely sure I understand, I do know that Response.Write will break an standard Ajax Partial Postback but that doesn't explain why your page is always fully posting back.
Paulie Waulie
Could you remove the reference to the ashx file and see if your page partially post backs?
Paulie Waulie