I set a timer and a label to display the countdown time in the update panel. I placed the following button to display the next question outside of the update panel.
My problem is that clicking the button does not work with the update panel. Without using the update panel and timer, it works well. How can i solve the problem?
I also tried to put whole tools inside the update panel. It didn’t help me.
Here is my code:
<asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> <table class="style1"> <tr> <td class="style2"> <asp:Timer ID="Timer1" runat="server" Interval="1000" ontick="Timer1_Tick"> </asp:Timer> <asp:Label ID="lblTimer" runat="server"></asp:Label> </tr> <tr> <td style="margin-left: 40px" class="style3"> <asp:Label ID="lblQuestion" runat="server"></asp:Label> </td> </tr> </table> </ContentTemplate> </asp:UpdatePanel> <table> <tr> <td style="margin-left: 40px" class="style2"> <asp:RadioButtonList ID="rblOptions" runat="server"> </asp:RadioButtonList> </td> </tr> <tr> <td style="margin-left: 40px" class="style2"> <table class="style1"> <tr> <td class="style2"> <asp:Button ID="btnNext" runat="server" onclick="btnNext_Click" Text="Next" Width="75px" /> </td> <td> <asp:Button ID="btnFinish" runat="server" onclick="btnFinish_Click" Text="Finish" Width="75px" /> </td> </tr> <tr> <td class="style2"> </td> <td> <asp:Label ID="lblScore" runat="server">Score : </asp:Label> </td> </tr> </table> </td> </tr> </table> <asp:UpdatePanel>
I have added the following code.
<Triggers> <asp:AsyncPostBackTrigger ControlID="btnNext" EventName="Click"/> </Triggers>
However, this did not work. Could you help me....
The selection of the switch is automatically cleared when using the update panel. Any help ....?
Thanks....
james raygan
source share