Web Developer Framework 4.0 Sample Questions – 10

Question: You are deploying an ASP.NET Web application to a remote server. You need to choose a deployment method that will ensure that all IIS settings, in addition to the Web content, will deploy to the remote server. Which deployment method should you choose?

  1. the XCOPY command-line tool
  2. the Copy Web Site tool
  3. the Web Deployment tool
  4. the Publish Web Site utility

Correct Answer: 3


Question: You are preparing to deploy an ASP.NET application to a production server by publishing the application in Release configuration. You need to ensure that the connection string value that is stored in the web.config file is updated to the production server s connection string value during publishing. What should you do?

  1. Add the following code to the web.config file. <connectionStrings><add name=”DB”connectionString=”Server=ProdServer;Database=ProdDB;Integrated Security=SSPI;”providerName=”Release” /> </connectionStrings>
  2. Add the following code to the web.config file. <connectionStrings><add name=”DB” connectionString=”Server=ProdServer;Database=ProdDB;Integrated Security=SSPI;” xdt:Transform=”Replace” xdt:Locator=”Match(name)” /> </connectionStrings>
  3. Add the following code to the web.release.config file. <connectionStrings><add name=”DB” connectionString=”Server=ProdServer;Database=ProdDB;Integrated Security=SSPI;” providerName=”Release” /> </connectionStrings>
  4. Add the following code to the web.release.config file. <connectionStrings><add name=”DB” connectionString=”Server=ProdServer;Database=ProdDB;Integrated Security=SSPI;” xdt:Transform=”Replace” xdt:Locator=”Match(name)” /> </connectionStrings>

Correct Answer: 4


Question: You are implementing an ASP.NET page. The page includes a method named GetCustomerOrderDataSet that returns a DataSet. The DataSet includes a DataTable named CustomerDetailsTable and a DataTable named OrderDetailsTable. You need to display the data in OrderDetailsTable in a DetailsView control named dtlView. Which code segment should you use?

  1. dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataMember = “OrderDetailsTable”; dtlView.DataBind();
  2. dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataSourceID = “OrderDetailsTable”; dtlView.DataBind();
  3. dtlView.DataSource = GetCustomerOrderDataSet(); dtlView.DataKeyNames = new string [] { “OrderDetailsTable”}; dtlView.DataBind();
  4. DataSet dataSet = GetCustomerOrderDataSet(); dtlView.DataSource = new DataTable(“dataSet”, “OrderDetailsTable”); dtlView.DataBind();

Correct Answer: 1


Question: 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?

  1. RowDataBound
  2. RowCommand
  3. Row Updated
  4. RowEditing

Correct Answer: 1


Question: You are implementing an ASP.NET page that will retrieve large sets of data from a data source. You add a ListView control and a DataPager control to the page. You need to ensure that the data can be viewed one page at a time. What should you do?

  1. Set the DataPager control s PageSize property to the number of rows to view at one time.
  2. Set the DataPager control s PagedControlID property to the ID of the ListView control.
  3. In the codebehind file, set the DataPager control s Parent property to the ListView control.
  4. In the codebehind file, set the ListView control s Parent property to the DataPager control.

Correct Answer: 2

Tagged . Bookmark the permalink.

Leave a Reply