Microsoft
70-515 · Question #49
You are implementing a read-only page that includes the following controls. <asp:Button ID="btnRefresh" runat="server" Text="Button" /> <asp:GridView ID="gvCustomers" runat="server"…
The correct answer is B. protected void Page_Load(object sender, EventArgs e). See the full explanation below for the reasoning.
Question
You are implementing a read-only page that includes the following controls. <asp:Button ID="btnRefresh" runat="server" Text="Button" /> <asp:GridView ID="gvCustomers" runat="server" EnableViewState="False" OnDataBinding="gvCustomers_DataBinding"></asp:GridView> You disable view state to improve performance. You need to ensure that the page is updated to display the latest data when the user clicks the refresh button. Which code segment should you use?
Options
- Aprotected void Page_PreInit(object sender, EventArgs e)
- Bprotected void Page_Load(object sender, EventArgs e)
- Cprotected void gvCustomers_DataBinding(object sender, EventArgs e)
- Dprotected void Page_PreRender(object sender, EventArgs e)
How the community answered
(61 responses)- A11% (7)
- B80% (49)
- C2% (1)
- D7% (4)
Community Discussion
No community discussion yet for this question.