asp.net - Update control panel -


i have problem update panel. have made table, , in table have 2 labels ("lblresult" , "lblcheat") need updated every time button "btncheck" or "imagebutton1" clicked. when click next button, whole table updated, , works fine code have.

i don't understand why aren't labels updating since using update panel same way "btnnext" button , "btncheck" , "imagebutton1"

<asp:updatepanel id="updatepanel1" runat="server">            <contenttemplate>                <center>                    <asp:label id="lblsound" runat="server" visible="false"></asp:label>                    <table>                        <tr>                        <td>                            <asp:label id="label3" runat="server" text="sentence: "></asp:label></td>                            <td colspan="2">                                <center>                                    <asp:label id="lblsentence" runat="server" text=""></asp:label>                                </center>                            </td>                        </tr>                        <tr>                            <td>                                <asp:label id="label2" runat="server" text="audio: "></asp:label>                            </td>                            <td colspan="2">                                <audio controls="">        <source src="sound/<%=filepath %>" />                                </audio>                            </td>                        </tr>                        <tr>                            <td style="height: 11px">                                <asp:label id="label1" runat="server" text="write correct word: "></asp:label>                            </td>                            <td style="height: 11px">                                <asp:textbox id="txtword" runat="server" ontextchanged="txtword_textchanged"></asp:textbox>                            </td>                            <td style="height: 11px">                                <center>                                    <asp:button id="btncheck" runat="server" onclick="btncheck_click"                                         text="check" />                                    <asp:imagebutton id="imagebutton1" runat="server" height="30px"                                         imageurl="~/besilka/question-mark-icon.png" onclick="imagebutton1_click"                                         width="30px" />                                </center>                            </td>                        </tr>                         <asp:updatepanel id="updatepanel2" runat="server">            <contenttemplate>                        <tr>                            <td>                                <center>                                    <asp:label id="lblresult" runat="server"></asp:label>                                </center>                            </td>                            <td>                                <center>                                    <asp:label id="lblcheat" runat="server" text=""></asp:label>                                </center>                            </td>                        </tr>                        </contenttemplate>                        <triggers>                        <asp:asyncpostbacktrigger controlid="btncheck" eventname="click" />         <asp:asyncpostbacktrigger controlid="imagebutton1" eventname="click" />                        </triggers>        </asp:updatepanel>                     </table>                </center>                <asp:button id="btnnext" runat="server" onclick="btnnext_click" text="next" />             </contenttemplate>            <triggers>             <asp:asyncpostbacktrigger controlid="btnnext" eventname="click" />            </triggers>            </asp:updatepanel> 

thanks in advance!

try setting nested update panel updatemode="conditional".

see arcticle:

specifically read "how updatepanel controls refreshed", talks updatemode , nesting update panels.

http://msdn.microsoft.com/en-us/library/bb386454%28v=vs.100%29.aspx

update panels take bit getting use :)


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -