我已經在更新面板中放置了一個定時器和一個用於顯示倒計時時間的標籤。我已經放置了下一個按鈕,用於在更新面板外顯示下一個問題。按鈕不適用於更新面板
我的問題是按鈕點擊不能與更新面板一起使用。沒有使用更新面板和計時器,它運作良好。我該如何解決這個問題?
我也嘗試在整個更新面板中放置整個工具。它沒有幫助我。
這裏是我的代碼:
<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>
添加以下代碼。
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnNext" EventName="Click"/>
</Triggers>
它仍然沒有工作。你能幫我...
當使用更新面板時,單選按鈕的選擇會自動清除。任何幫助....?
謝謝....
你是什麼意思「不工作」,它是否會導致任何回發? – Serge
是否有任何異常或錯誤? –
您剛剛嘗試將AutoPostBack =「true」添加到您的控制器「 」嗎? –