Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
update panel is not working in link button


XML
<div class="pnl_rvw">
                    <h3>Filter reviews</h3>
                     <asp:UpdatePanel ID="jp" runat="server" UpdateMode="Conditional">
                                               <ContentTemplate>
                    <ul>
                        <li><asp:LinkButton ID="link1" runat="server" CommandArgument='<%#Eval("product_id") %>' CommandName="five_str" OnCommand="fivestar_Command" ForeColor="Green">
                                     4 and 5 star rated certified buyer reviews
                                    </asp:LinkButton></li>
                        <li><asp:LinkButton ID="link2" runat="server" CommandArgument='<%#Eval("product_id") %>' CommandName="three_str" OnCommand="fivestar_Command" ForeColor="Green">
                                     2 and 3 star rated certified buyer reviews
                                    </asp:LinkButton>   </li>
                        <li><asp:LinkButton ID="link3" runat="server" CommandArgument='<%#Eval("product_id") %>' CommandName="thre_str" OnCommand="fivestar_Command" ForeColor="Green">
                                     1 star rated certified buyer reviews
                                    </asp:LinkButton>   </li>
                    </ul>
                  </ContentTemplate>
 

<Triggers>
                                               <asp:AsyncPostBackTrigger ControlID ="link1" EventName="Click" />
                                                <asp:AsyncPostBackTrigger ControlID ="link2" EventName="Click" />
                               <asp:AsyncPostBackTrigger ControlID ="link3" EventName="Click" />
                                                
                                            </Triggers>
                         </asp:UpdatePanel>
                </div>
Posted
Updated 3-May-15 20:17pm
v2
Comments
Prakash J 4-May-15 2:07am    
I have a asp.net web application. In my .aspx page I have a update panel in which I have 3 asp:LinkButton that should make a call to a c# code behind. The problem is that the onclick doesn't work.
[no name] 4-May-15 2:13am    
u can use trigger. <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
Prakash J 4-May-15 2:18am    
i used triggers bt not working
[no name] 4-May-15 2:21am    
k,check the 2nd ref link in my solution. remove the trigger and put UpdateMode="Conditional"
Prakash J 4-May-15 2:20am    
i used trigger @RajeeshMenoth.see my above code

1 solution

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900