You are implementing an ASP.NET application that uses data-b

题目
单选题
You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add JavaScript code to periodically update specific types of data items in these GridView controls. You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridView controls, without needing to be changed if the controls are moved from one page to another. What should you do?()
A

Replace the GridView control with a ListView control.

B

Set the ClientIDMode attribute to Predictable in the web.config file.

C

Set the ClientIDRowSuffix attribute of each unique GridView control to a different value.

D

Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control.

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You are a database administrator for your company. The company uses a vendor company’s application that is based on a proprietary database. You query data from the application database and import the data into a SQL Server 2005 database. The application vendor provides you with a new OLE DB driver to be used when querying the application database. Company policy prohibits connections between the SQL Server database and the application database, except when querying this data. You need to provide a way to query data from the application database. What should you?()

  • A、Configure a Linked Server connection to the application database.
  • B、Write a query that uses an OPENDATASOURCE command.
  • C、Write a query that uses an OPENQUERY command.
  • D、Configure a Remote Server connection to the application database.

正确答案:B

第2题:

You install a third-party application on your computer. The application uses port 80 to negotiate a listening port. After establishing the listening port, the application uses dynamic ports above 6000.  You need to configure Microsoft Windows Firewall to allow traffic for the application.  What should you do? ()

  • A、Add a port exception for port 80.
  • B、Disable the Core Networking exception.
  • C、Restore the Windows Firewall defaults.
  • D、Add a program exception for the new application.

正确答案:D

第3题:

You are writing an application that uses isolated storage to store user preferences.The application uses multiple assemblies.Multiple users will use this application on the same computer.You need to create a directory named Preferences in the isolated storage area that is scoped to the current Microsoft Windows identity and assembly.Which code segment should you use?()

A.

B.

C.

D.


参考答案:A

第4题:

You work as a Web Developer at Certkiller.com. You create a Web application using MicrosoftASP.NET 3.5.  Certkiller.com hosts the application in Microsoft Internet Information Services 7.0. You attempt tobrowse the application and receive the following error message:  Service Unavailable    HTTP Error 503. The service is unavailable.   You check and discover that you are able to browse successfully to other application that formspart of the same IIS Web site. The hosted applications on the network make use of ASP.NET 3.5.There are not previous versions of ASP.NET is installed. You need to resolve this error as soon aspossible.  What should you do?()

  • A、You should run the ServiceModel Metadata Utility tool (Svcutil.exe).
  • B、You should change the pipeline mode associated with the application pool that hosts theapplication.
  • C、You should run the ASP.NET Registration Tool (Aspnet_regiis.exe).
  • D、You should make sure that the application pool that hosts the application is initiated.

正确答案:D

第5题:

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?()

  • A、ObjContext.SaveChanges(SaveOptions.DetectChangesBeforeSave);
  • B、ObjContext.SaveChanges(SaveOptions.AcceptAllChangesAfterSave);
  • C、ObjContext.SaveChanges(SaveOptions.All);
  • D、ObjContext.SaveChanges(SaveOptions.None);

正确答案:A

第6题:

You are implementing an ASP.NET MVC 2 Web application that allows users to view and edit data. You need to ensure that only logged-in users can access the Edit action of the controller. What are two possible attributes that you can add to the Edit action to achieve this goal? ()

  • A、[Authorize(Users = "")]
  • B、[Authorize(Roles = "")]
  • C、[Authorize(Users = "*")]
  • D、[Authorize(Roles = "*")]

正确答案:A,B

第7题:

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform.  You are creating an ASP.NET Web application using .NET Framework 4.0. The Web application comprises a class named Employee with properties named as First Name, Last Name, and Age. You add a Web page in which you get a list of Employee objects and display those objects in a GridView control. You are required to add code so that the GridView row is highlighted in red color if the age of the employee is less than 21 years.  What will you do to accomplish this?()

  • A、Use the RowCommand event of the GridView control.
  • B、Use the SelectedlndexChanged event of the GridView control.
  • C、Use the RowDataBound event of the GridView control.
  • D、Use the RowEditing event of the GridView control.
  • E、Use the RowUpdated event of the GridView control.

正确答案:C

第8题:

You develop an ASP.NET web application that uses a Windows Azure web role. The application includes a startup script that installs a third-party component. You are developing a test plan for the startup script.  What should you recommend?()  

  • A、 Enable Remote Desktop Protocol (RDP) and deploy the application without the startup script.  Connect to the web role instance by using RDP, and then manually test the startup script.
  • B、 Deploy the application in the Windows Azure Compute Emulator.
  • C、 Deploy the application with a custom error page.
  • D、 Deploy the application and then use IntelliTrace.

正确答案:A

第9题:

You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application uses Session objects. You are modifying the application to run on a Web farm. You need to ensure that the application can access the Session objects from all the servers in the Web farm. You also need to ensure that when any server in the Web farm restarts or stops responding, the Session objects are not lost.  What should you do?()

  • A、Use the InProc Session Management mode to store session data in the ASP.NET worker process. 
  • B、Use the SQLServer Session Management mode to store session data in a common Microsoft SQL Server 2005 database. 
  • C、Use the SQLServer Session Management mode to store session data in an individual database for each Web server in the Web farm. 
  • D、Use the StateServer Session Management mode to store session data in a common State Server process on a Web server in the Web farm. 

正确答案:B

第10题:

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. You create a Web page in the application. The Web page will get large sets of data from a data source.  You add a DataPager control to the page. You are required to display navigation controls that enable you to create a custom paging Ul for the DataPager control. What will you do?()

  • A、Use NextPreviousPagerField.
  • B、Use NumericPagerField.
  • C、Use PreviousPagerField.
  • D、Use NextPagerField.
  • E、Use TemplatePagerField.

正确答案:E

更多相关问题