70-528  Exam

Exam # of questions Description  Update
70-528 88 Microsoft 70-528 MS.NET Framework 2.0-Web-based C... 02/15/2011
[Practice Test]   [Download Study Guide(PDF)]  [Update Exam]

70-528 - Exam Information
  • Description:Microsoft 70-528 MS.NET Framework 2.0-Web-based Client Development
  • Passing Score:75%
  • Practice Test - Number of questions:88 questions
  • Simulation Test - Number of questions:88 questions
  • Simulation Test Duration:41 minutes
  • Has explanations:Yes

Question of the day

You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database. When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields. You need to ensure that the Web Form does not update if the user has not entered data in all of the fields. Which code segment should you use?

Answer(s)

  1. protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) { foreach (DictionaryEntry entry in e.Keys) { if (entry.Value.ToString() == System.String.Empty) { e.Cancel = true; return; } }}
  2. protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { foreach (DictionaryEntry entry in e.NewValues) { if (entry.Value.Equals("")) { e.KeepInEditMode = true; return; } }}
  3. protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) { foreach (DictionaryEntry entry in e.NewValues) { if (entry.Value.Equals("")) { e.Cancel = true; return; } }}
  4. protected void FormView1_ItemUpdated(object sender, FormViewUpdatedEventArgs e) { foreach (DictionaryEntry entry in e.Keys) { if (entry.Value.ToString() == System.String.Empty) { e.KeepInEditMode = true; return; } }}
Correct Answer

protected void FormView1_ItemUpdating(object sender, FormViewUpdateEventArgs e) { foreach (DictionaryEntry entry in e.NewValues) { if (entry.Value.Equals("")) { e.Cancel = true; return; } }}