nerdexam
Microsoft

70-515 · Question #111

You are developing an ASP.NET Web page that contains input controls, validation controls, and a button named btnSubmit. The page has the following code-behind. (Line numbers are included for…

The correct answer is D. Add the following code segment at line 10. See the full explanation below for the reasoning.

Question

You are developing an ASP.NET Web page that contains input controls, validation controls, and a button named btnSubmit. The page has the following code-behind. (Line numbers are included for reference only.) 01 public partial class _Default : System.Web.UI.Page 02 { 03 protected void SaveToDatabase() 04 { 05 06 } 07 08 protected void btnSubmit_Click(object sender, EventArgs e) 09 { 10 11 } 12 } You need to ensure that all data that is submitted passes validation before the data is saved in a database. What should you do?

Options

  • AAdd the following method override.
  • BAdd the following method override.
  • CAdd the following method override.
  • DAdd the following code segment at line 10.

How the community answered

(26 responses)
  • A
    8% (2)
  • B
    15% (4)
  • C
    4% (1)
  • D
    73% (19)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice