為大家收集整理了《2013年微軟認(rèn)證考試_70-562練習(xí)5》供大家參考,希望對(duì)大家有所幫助?。?!
QUESTION 9
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You derive a new validation control from the BaseValidator class.
The validation logic for the control is implemented in the Validate method in the following manner.
protected static bool Validate(string value) { ...
} You need to override the method that validates the value of the related control.
Which override method should you use?
A.
protected override bool EvaluateIsValid() { string value = GetControlValidationValue( this.Attributes["AssociatedControl"]); bool isValid = Validate(value); return isValid; }
B.
protected override bool ControlPropertiesValid() { string value = GetControlValidationValue(this.ValidationGroup); bool isValid = Validate(value); return isValid; }
C.
protected override bool EvaluateIsValid() { string value = GetControlValidationValue(this.ControlToValidate); bool isValid = Validate(value); return isValid; }
D.
protected override bool ControlPropertiesValid() { string value = GetControlValidationValue( this.Attributes["ControlToValidate"]); bool isValid = Validate(value); this.PropertiesValid = isValid; return true; }
Answer: C
QUESTION 10
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You add an XmlDataSource control named XmlDataSource1 to the Web page.
XmlDataSource1 is bound to an XML document with the following structure.
...
You also write the following code segment in the code-behind file of the Web page.
protected void BulletedList1_Click( ?object sender, BulletedListEventArgs e) { //...
}
You need to add a BulletedList control named BulletedList1 to the Web page that is bound to XmlDataSource1.
Which code fragment should you use?
A.
B.
C.
D.
Answer: C
QUESTION 9
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You derive a new validation control from the BaseValidator class.
The validation logic for the control is implemented in the Validate method in the following manner.
protected static bool Validate(string value) { ...
} You need to override the method that validates the value of the related control.
Which override method should you use?
A.
protected override bool EvaluateIsValid() { string value = GetControlValidationValue( this.Attributes["AssociatedControl"]); bool isValid = Validate(value); return isValid; }
B.
protected override bool ControlPropertiesValid() { string value = GetControlValidationValue(this.ValidationGroup); bool isValid = Validate(value); return isValid; }
C.
protected override bool EvaluateIsValid() { string value = GetControlValidationValue(this.ControlToValidate); bool isValid = Validate(value); return isValid; }
D.
protected override bool ControlPropertiesValid() { string value = GetControlValidationValue( this.Attributes["ControlToValidate"]); bool isValid = Validate(value); this.PropertiesValid = isValid; return true; }
Answer: C
QUESTION 10
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You add an XmlDataSource control named XmlDataSource1 to the Web page.
XmlDataSource1 is bound to an XML document with the following structure.
...
You also write the following code segment in the code-behind file of the Web page.
protected void BulletedList1_Click( ?object sender, BulletedListEventArgs e) { //...
}
You need to add a BulletedList control named BulletedList1 to the Web page that is bound to XmlDataSource1.
Which code fragment should you use?
A.
B.
C.
D.
Answer: C