Microsoft
98-361 · Question #394
You write the following code in your Web page: protected void Page_Load (object sender, EventArgs e) { / additional code here / } You expect this code to be executed in response to the Load event of…
The correct answer is A. Set the AutoEventWireup attribute of the @page directive to true. See the full explanation below for the reasoning.
Question
You write the following code in your Web page:
protected void Page_Load (object sender, EventArgs e) { /* additional code here */ } You expect this code to be executed in response to the Load event of the ASP.NET page. However, when you request the page, you notice that the method is not executed. What should you do to make sure that the Page_Load method is executed when the Load event of the Wep page is fired?
Options
- ASet the AutoEventWireup attribute of the @page directive to true.
- BSet the AutoEventWireup attribute of the @page directive to false.
- CSet the IsCallBack property of the page class to true.
- DSet the IsPostBack property of the page class to true.
How the community answered
(47 responses)- A74% (35)
- B6% (3)
- C15% (7)
- D4% (2)
Community Discussion
No community discussion yet for this question.