在复习微软的过程中中还是不够全面,为了帮助广大考生系统全面的复习好《微软认证学科》,我们考吧网整理了微软认证模拟试题,本次汇编的模拟试题希望对你的考试有所帮助,预祝你考试顺利。
编辑推荐:2013年微软认证:微软认证考试必备经典试题汇总三
You plan to add a custom parameter in the SqlDataSource control.
You write the following code fragment.
You write the following code segment to create a custom parameter class.
public class DayParameter : Parameter { }
You need to ensure that the custom parameter returns the current date and time.
Which code segment should you add to the DayParameter class?
A. |
protected DayParameter() : base("Value", TypeCode.DateTime, DateTime.Now.ToString()) { } |
B. |
protected override void LoadViewState(object savedState) { ((StateBag)savedState).Add("Value", DateTime.Now); } |
C. |
protected override object Evaluate(HttpContext context, Control control) { return DateTime.Now; } |
D. |
protected override Parameter Clone() { Parameter pm = new DayParameter(); pm.DefaultValue = DateTime.Now; return pm; } |
Answer: C