What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You use the ADO.NET Entity Data Model (EDM) to define a Customer entity. You need to add a new Customer to the data store without setting all the customer’s properties.
What should you do?
Which code segment should you use?
You are developing an ASP.NET MVC 2 application.
A view contains a form that allows users to submit their first name.
You need to display the value that is submitted, and you must ensure that your code avoids cross-site scripting.
Which code segment should you use?
What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. The application allows users to make changes to entities while disconnected from the central data store.
You need to ensure that when the user connects to the central data store and retrieves new data, the application meets the following requirements:
Changes made to the local data store in disconnected mode are preserved.
Entities that have already been loaded into the local data store, but have not been modified by the user, are updated with the latest data.
What should you do?
What should you do?
You are packaging updates for multiple Windows Presentation Foundation (WPF) applications by using Microsoft .NET Framework 4. Updates to the applications and to thirdparty control files are available. Updates to the applications have dependencies upon updates to the thirdparty control files. An update script is run at logon that allows only a single command to be executed. You need to package the application updates and updates to the third party controls to ensure that they are successfully installed. What should you do?
Which ActionLink should you use?
You are developing an ASP.NET MVC 2 Web application.
The application contains a controller named HomeController, which has an action named Index.
The application also contains a separate area named Blog.
A view within the Blog area must contain an ActionLink that will link to the Index action of the HomeController.
You need to ensure that the ActionLink in the Blog area links to the Index action of the HomeController.
Which ActionLink should you use?
What are two possible ways to achieve this goal?
You create a page in an ASP.NET Web application. The page retrieves and displays data from a Microsoft SQL Server database. You need to create a data source that can connect to the database. What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
What is the source of the problem?
You are designing a Windows Presentation Foundation (WPF) application by using Microsoft .NET Framework 4 and Microsoft SQL Server 2008. The application runs successfully on a local client computer by using your user account. You deploy the database of the application to the production server. You configure the application connection string to use the Windows Authentication mode. You deploy the application to several client computers that use other applications on the network. The client computers access different databases on the production server by using the Windows Authentication mode. Users report that the application is not working and that they receive a database connection exception. You need to identify the source of the problem. What is the source of the problem?
Which two actions should you perform?
You are developing an ASP.NET Web page. You add the following markup to the page.
<asp:FileUpload id=”FileUpload1″ runat=”server” />
<asp:Button id=”btnUpload” Text=”Upload selected file” OnClick=”btnUpload_Click” runat=”server” />
<asp:Label id=”lblFeedback” runat=”server” />
You add the following code segment to the code-behind. (Line numbers are included for reference only.)
01 protected void btnUpload_Click(object sender, EventArgs e)
02 {
03 if (…)
04 {
05 string saveName = Path.Combine(@”c:\uploadedfiles\”, FileUpload1.FileName);
06
07 lblFeedback.Text = “File successfully uploaded.”;
08 }
09 else
10 {
11 lblFeedback.Text = “File upload failed.”;
12 }
13 }
You need to save the uploaded file and display a message to the user that indicates that the upload either succeeded or failed.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which two actions should you perform?
You are implementing an ASP. NET MVC 2 Web application. You add a controller named CompanyController.
You need to modify the application to handle the URL path /company/info.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
What should you do?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application connects to a Microsoft SQL Server 2008 database. The application uses DataContexts to query the database. You create a function that meets the following requirements:
* Updates the Customer table on the database when a customer is marked as deleted.
* Updates the related entries in other tables (CustomerAddress, CustomerContacts) by marking them as deleted.
* Prevents consumer code from setting the Deleted column’s value directly.
You need to ensure that the function verifies that customers have no outstanding orders before they are marked as deleted. You also need to ensure that existing applications can use the updated function without requiring changes in the code. What should you do?