单项选择题You are implementing an ASP.NET Web site that will be accessed by an international audience. The site contains global and local resources for display elements that must be translated into the language that is selected by the user. You need to ensure that the Label control named lblCompany displays text in the user’s selected language from the global resource file. Which control markup should you use?()

A.<asp:Label ID="lblCompany" runat="server" meta:resourcekey="lblCompany" />
B.<asp:Label ID="lblCompany" runat="server" Text="meta:lblCompany.Text" /> 
C.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:lblCompanyText %>" />
D.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:WebResources, lblCompanyText %>" />


您可能感兴趣的试卷

你可能感兴趣的试题

3.单项选择题

You create an ASP.NET MVC 2 Web application that contains the following controller class.
In the Views folder of your application, you add a view page named Index.aspx that includes the following @ Page directive.

You test the application with a browser.You receive the following error message when the Index method is invoked: "The view 'Index' or its master was not found." You need to resolve the error so that the new view is displayed when the Index method is invoked.What should you do?()

A.Change the name of the Index.aspx file to Product.aspx.
B.Create a folder named Product inside the Views folder. Move Index.aspx to the Product folder.
C.Replace the @ Page directive in Index.aspx with the following value.
D.Modify the Index method by changing its signature to the following:public ActionResult Index(Product p)

7.单项选择题You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/{country} will return a page that provides information about the named country. You need to ensure that requests for this URL that contain an unrecognized country value will not be processed by the Details action of HomeController. What should you do?()

A.Add the ValidateAntiForgeryToken attribute to the Details action method.
B.Add the Bind attribute to the country parameter of the Details action method. Set the attribute’s Prefix property to Country.
C.Create a class that implements the IRouteConstraint interface. Configure the default route to use this class.
D.Create a class that implements the IRouteHandler interface. Configure the default route to use this class.

9.单项选择题

You are implementing an ASP.NET Dynamic Data Web site. The Web site includes a data context that enables automatic scaffolding for all tables in the data model. The Global.asax.cs file contains the following code segment.
You need to display the items in a table named Products by using a custom layout. What should you do?()

A.Add a new Web page named Products.aspx to the Dynamic Data\PageTemplates folder of the Web site.
B.Add a new folder named Products to the Dynamic Data\CustomPages folder of the Web site. Add a new Web page named ListDetails.aspx to the Products folder.
C.Add a new Web user control named Products.ascx to the Dynamic Data\Filters folder of the Web site. In the code-behind file for the control, change the base class from UserControl to  System.Web.DynamicData.Query.
D.Add a new Web user control named Products_ListDetails.ascx to the DynamicData\EntityTemplates folder of the Web.In the code-behind file for the control, change the base class from UserControl to System.Web.DynamicData.Entity.

10.多项选择题

You are implementing an ASP.NET Web site. The site contains the following class. 
The Web site interacts with an external data service that requires Address instances to be given in the following XML format.

You need to ensure that Address instances that are serialized by the XmlSerializer class meet the XML format requirements of the external data service. Which two actions should you perform.()

A.Add the following attribute to the AddressType field. [XmlAttribute]
B.Add the following attribute to the Line2 field. [XmlElement(IsNullable=true)]
C.Add the following attribute to the ZipPostalCode field. [XmlAttribute("ZipCode")]
D.Add the following attribute to the ZipPostalCode field. [XmlElement("ZipCode")]

最新试题

Which method of the Page class searches the page naming container for a server control with a particular identifer?()

题型:单项选择题

You are developing an ASP.NET Web page that uses jQuery validation. The user should enter a valid email address in a text box that has ID txtEmail. The page must display "E-Mail address required" when the user does not enter an address and "Invalid e-mailaddress" when the user enters an address that is not formatted properly. You need to ensure that the appropriate error message is displayed when the text box does not contain a valid e-mail address.  Which two code segments should you add?()

题型:多项选择题

Which control allows you to bind to data items that are returned from a data source and display them?()

题型:单项选择题

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You create an ASP.NET Web application using .NET Framework 4.0. The Web application connects to a SQL Server database. You use the ADO.NET Entity Framework to handle persistence-ignorant entities. You create an ObjectContext object named ObjContext. Subsequently, you change properties on numerous entities. You are required to save the changed entity values in the SQL Server database. Which of the following code segments will you use?()

题型:单项选择题

You develop an ASP.NET Web page that includes multiple WebPartZone controls, an EditorZone. Users report that they cannot customize the layout of the page by moving WebParts from one.You need to ensure that users can successfully move Web Parts from one zone to another. What should you do?()

题型:单项选择题

You are developing an ASP.NET Web application. The application must pass an object that contains user-specific data between multiple pages. The object ismore than 100 KB in size when serialized.You need to minimize the amount of data is sent to the user.What should you do?()

题型:单项选择题

You are perfoming security testing on an existing asp.net web page.You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?()

题型:单项选择题

Which class is used to specify a set of features to support on the XrnlReader object created by the Create method?()

题型:单项选择题

You have a login.ascx control and to display it in a view which method u would use()

题型:单项选择题

You are developing a Asp.net web application tht includes a panel control that has ID contentsection.You need to add a textBox control to the panel control.()

题型:单项选择题