nerdexam
Microsoft

70-515 · Question #191

You have a C# code snippet with 2 classes, one composed by elements of the other. Something like public class Student { public string Name {get;set;} } public class Supervisor { public string name…

The correct answer is B. bind rptStudents with the list of current item in SupervisorsList using the ItemCommand. See the full explanation below for the reasoning.

Question

You have a C# code snippet with 2 classes, one composed by elements of the other. Something like public class Student { public string Name {get;set;} } public class Supervisor { public string name {get;set;} public List<Student> {get;set;} } And a markup code snippet, with 2 repeaters imbricated + a ObjectDataSource retrieving a list of Supervisors, the top level repeater "rptSupervisors" is bound using ObjectDataSourceID to the ObjectDataSource, and the inside one "rptStudents" is not bound yet. We understand that we need a list of supervisors and sublists of their relative students.

Options

  • Abind rptStudents with the list of current item in SupervisorsList using the ItemDataBound
  • Bbind rptStudents with the list of current item in SupervisorsList using the ItemCommand
  • Cdatabinding directly the rptStudents in the page load or something dummy like that
  • Danother dummy solution involving a "supervisors have all the same students" situation

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    75% (18)
  • C
    13% (3)
  • D
    8% (2)

Community Discussion

No community discussion yet for this question.

Full 70-515 Practice