mcts ajax question
You are implementing an ASP.NET AJAX page. You add the following control to the page.
<asp:UpdatePanel 开发者_如何学CID="pnl1" runat="server" UpdateMode="Conditional">
<ContentTemplate> ... </ContentTemplate>
</asp:UpdatePanel>
You need update the contents of the UpdatePanel
without causing
a full reload of the page. Which two actions should you perform? (Each correct answer presents part of the
solution. Choose two.)
A. Add the following control before the UpdatePanel
. <asp:Timer ID="Timer1" OnLoad="Timer1_Tick"
runat="server" Interval="3000" />
B. Add the following control within the UpdatePanel
. <asp:Timer ID="Timer1" OnLoad="Timer1_Tick"
runat="server" Interval="3000" />
C. Add an AsyncPostBackTrigger
that references Timer1
.
D. Add a PostBackTrigger
that references Timer1
.
You should place Timer within UpdatePanel to update contetns. So, right answers are B and C.
From MSDN "You use the Timer control to update an UpdatePanel control by including the timer inside the UpdatePanel control. Alternatively, you can place the timer outside the UpdatePanel control and set the timer as a trigger."
Sounds like the answer is A+C or just B.
精彩评论