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?()
第1题:
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 add an event handler to?()
第2题:
You are implementing an ASP.NET application that includes a page named TestPage.aspx. TestPage.aspx uses a master page named TestMaster.master.You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public property named CityName. Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs) Handles Me.LoadDim s As String = Master.CityNameEnd Sub You need to ensure that TestPage.aspx can access the CityName property. What should you do?()
第3题:
You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience. The custom user control uses two TextBox controls and two Button controls. You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site. Which two actions should you perform? ()
第4题:
You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using the ASP.NET page designer. You need to add a control to the master page to define the region. Which control should you add?()
第5题:
You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience.The custom user control uses two TextBox controls and two Button controls.You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site. Which two actions should you perform?()
第6题:
You are developing an ASP.NET Web application. You create a master page. The master page requires a region where you can add page-specific content by using theASP.NET page designer. You need to add a control to the master page to define the region. Which control should you add?()
第7题:
You are implementing an ASP.NET application. The application includes a Person class with property Age. You add a page in which you get a list of Person objects and display the objects in a GridView control. You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18. Which GridView event should you handle?()
第8题:
In the InitComplete event handler, set the Theme property of the Page object based on the user profile.
In the PreLoad event handler, set the Theme property of the Page object based on the user profile.
In the OnLoad event handler, set the Theme property of the Page object based on the user profile.
In the PreInit event handler, set the Theme property of the Page object based on the user profile.
第9题:
SetPage.MasterPageFile in the Page’sPage_Initevent.
SetPage.MasterPageFile in the Page’sOnInit event.
SetPage.MasterPageFile in the Page’sPage_Loadevent.
SetPage.MasterPageFile in the Page’sPage_PreInitevent.
第10题:
Add the OnClick event handler for the Login button to the code used in the custom user control.
Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.
In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.
In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.
第11题:
IComparer<T>
IEnumerable<T>
IEnumerator<T>
IEqualityComparer<T>
第12题:
Add the following method override. Protected Overrides Sub OnInit(ByVal e As EventArgs) MyBase.OnInit(e) If (Page.IsValid) Then Me.SaveToDatabase() End Sub
Add the following method override. Protected Overrides Sub OnLoad(ByVal e As EventArgs) MyBase.OnLoad(e) If (Page.IsValid) Then Me.SaveToDatabase() End Sub
Add the following method override.Protected Overrides Sub OnPreRender(ByVal e As EventArgs) MyBase.OnPreRender(e) If (Page.IsValid) Then Me.SaveToDatabase() End Sub
Add the following code segment at line 10. If (Page.IsValid) Then Me.SaveToDatabase()
第13题:
You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do? ()
第14题:
You use Microsoft .NET Framework 4 to create a Windows Forms application. You add a new class named Customer to the application. You select the Customer class to create a new object data source. You add the following components to a Windows Form: A BindingSource component named customerBindingSource that is data-bound to the Customer object data source. A set of TextBox controls to display and edit the Customer object properties. Each TextBox control is data-bound to a property of the customerBindingSource component. An ErrorProvider component named errorProvider that validates the input values for each TextBox control. You need to ensure that the input data for each TextBox control is automatically validated by using the ErrorProvider component. Which two actions should you perform?()
第15题:
You develop a Web application that contains two master pages. You need to dynamically set the master page when a user views pages in the application. What should you do? ()
第16题:
You are testing an existing ASP.NET page. The page includes a text box. You are able to execute malicious JavaScript code by typing it in the text box and submitting. You need to configure the page to prevent JavaScript code from being submitted by the text box. In the @ Page directive, which attribute should you set to true?()
第17题:
You are developing an ASP.NET Web page that will display the median value from a sequence of integer values. You need to create an extension method to compute the median value. Which interface should you add the extension method to?()
第18题:
You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx.
第19题:
btnAddToCart_Click
Page_Load
Page_PreRender
Page_PreInit
第20题:
Add the following line of code to TestUserControl.ascx.cs. public event MyEventHandler MyEvent;
Add the following line of code to TestUserControl.ascx.cs. public MyEventHandler MyEvent;
Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. <uc:TestUserControl ID=testControl runat=server OnMyEvent=TestMethod/>
第21题:
Implement the validation rules inside the Validating event handler of each TextBox control by throwing an exception when the value is invalid.
Implement the validation rules inside the TextChanged event handler of each TextBox control by throwing an exception when the value is invalid.
Implement the validation rules inside the setter of each property of the Customer class by throwing an exception when the value is invalid.
Add the following code segment to the InitializeComponent method of the Windows Form. this.errorProvider.DataSource = this.customerBindingSource;
Add the following code segment to the InitializeComponent method of the Windows Form. this.errorProvider.DataSource = this.customerBindingSource.DataSource; this.errorProvider.DataMember = this.customerBindingSource.DataMember;
第22题:
Add the OnClick event handler for the Login button to the code used in the custom user control.
Add the OnClick event handler for the Login button to the code used in the Web Form where the control is added.
In the Page_Load method of the Web Form, add a code segment to set the visibility of the TextBox and Button controls where the control is added.
In the Page_Load method of the custom user control, add a code segment to set the visibility of the TextBox and Button controls.
第23题:
the EnableEventValidation attribute
the ResponseEncoding attribute
the ValidateRequest attribute
the Strict attribute