相关考题

单项选择题 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You add a TextBox control named TextBox1.  You write the following code segment for validation:   protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args) {   DateTime dt = String.IsNullOrEmpty(args.Value) ? DateTime.Now : Convert.ToDateTime(args.Value);   args.IsValid = (DateTime.Now - dt).Days < 10;   }   You need to validate the value of TextBox1.  Which code fragment should you add to the Web page? ()

单项选择题 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a composite custom control named MyControl.  You need to add an instance of the OrderFormData control to the MyControl control.  Which code segment should you use?()

单项选择题 You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create the following controls:  a composite custom control named MyControl. a templated custom control named OrderFormData.   You write the following code segment to override the method named CreateChildControls() in the MyControl class:   01 protected override void CreateChildControls()  02 {   03   Controls.Clear();   04   OrderFormData oFData = new   05     OrderFormData("OrderForm");   06   07 }    You need to add the OrderFormData control to the MyControl control.  Which code segment should you insert at line 06? ()