You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to verify that all input values submitted by the user have been validated by testing the Page.IsValid property. Which page event should you add an event handler to?()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web page that has a GridView control named GridView1. The GridView1 control displays the data from a database named Region and a table named Location. You write the following code segment to populate the GridView1 control. (Line numbers are included for reference only.) 01 Protected Sub Page_Load(ByVal sender As Object, _ ByVal e As EventArgs) 02 Dim connstr As String 03 ... 04 SqlDependency.Start(connstr) 05 Using connection As New SqlConnection(connstr) 06 Dim sqlcmd As New SqlCommand() 07 Dim expires As DateTime = DateTime.Now.AddMinutes(30) 08 Dim dependency As SqlCacheDependency = _ 09 New SqlCacheDependency("Region", "Location") 10 Response.Cache.SetExpires(expires) 11 Response.Cache.SetValidUntilExpires(True) 12 Response.AddCacheDependency(dependency) 13 14 sqlcmd.Connection = connection 15 GridView1.DataSource = sqlcmd.ExecuteReader() 16 GridView1.DataBind() 17 End Using 18 End Sub You need to ensure that the proxy servers can cache the content of the GridView1 control. Which code segment should you insert at line 13? () | English | Chinese | Japan | Korean | - 90 - Test Information Co., Ltd. All rights reserved.
You modify an existing Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You add a theme to the ASP.NET application. You need to apply the theme to override any settings of individual controls. What should you do?()
You are implementing an ASP.NET Web application. Users will authenticate to the application with an ID. The application will allow new users to register for an account. The application will generate an ID for the user based on the users full name. You need to implement this registration functionality. Which two actions should you perform?()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application consumes a Microsoft Windows Communication Foundation (WCF) service. The WCF service exposes the following method. You need to invoke the UpdateCustomerDetails method. Which code segment should you use?()
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 Sub _ | English | Chinese | Japan | Korean | - 24 - Test Information Co., Ltd. All rights reserved. CustomValidator1_ServerValidate(ByVal source As Object, _ ByVal args As ServerValidateEventArgs) Dim dt As DateTime = _ IIf([String].IsNullOrEmpty(args.Value), _ DateTime.Now, Convert.ToDateTime(args.Value)) args.IsValid = (DateTime.Now - dt).Days < 10 End Sub 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 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. (Line numbers are included for reference only.) 01 Protected Overloads Overrides Sub CreateChildControls( ) 02 Controls.Clear( ) 03 Dim oFData As New OrderFormData("OrderForm") 04 05 End Sub You need to add the OrderFormData control to the MyControl control. Which code segment should you insert at line 04? ()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You add a Web form that contains the following code fragment. AllowSorting="True" DataSourceID="Products"> SelectMethod="GetData" TypeName="DAL" /> | English | Chinese | Japan | Korean | - 42 - Test Information Co., Ltd. All rights reserved. You write the following code segment for the GetData method of the DAL class. (Line numbers are included for reference only.) 01 Public Function GetData( ) As Object 02 Dim cnn As New SqlConnection( 03 Dim strQuery As String = "SELECT * FROM Products" 04 05 End Function You need to ensure that the user can use the sorting functionality of the gvProducts GridView control. Which code segment should you insert at line 04?()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a Web form by using ASP.NET AJAX. You write the following client-script code fragment to handle the exceptions thrown from asynchronous postbacks. (Line numbers are included for reference only.) 01 02 function pageLoad() 03 { 04 var pageMgr = 05 Sys.WebForms.PageRequestManager.getInstance(); 06 07 } 08 09 function errorHandler(sender, args) 10 { 11 12 } 13 You need to ensure that the application performs the following tasks: ¡;¤Use a common clien-script function named errorHandler. ¡;¤Update a Label control tat has an ID named lblError with the error message. ¡;¤Prevent the browser from displaying any message box or Javascript error What should you do?()
You are implementing an ASP.NET page that hosts a user control named CachedControl. You need to ensure that the content of the user control is cached for 10 seconds and that it is regenerated when fetched after the 10 seconds elapse. Which two actions should you perform?()