Microsoft UPGRADE: MCAD Skills to MCTS Web Apps Using MS.NET Framework - 070-559 Exam Practice Test

Question 1
You work as the developer in an IT company. Recently your company has a big customer. The customer is a large international compay. You're appointed to provide technical support for the customer. Now according to the customer requirement, you're creating a Web application which displays data by using a GridView control. For the Web application, you drag and drop tables from the Data Connections tree in Server Explorer build Web Forms.
The following is the Add Connection dialog box. (Click the Exhibit button.) You have to use this to add a connection to your data. You have to create the data source objects, so you need to configure the .NET Data Provider that you use to achieve this.
What should you do?

Correct Answer: B
Question 2
You have just graduated from college' now you are serving the internship as the software developer in an international company. According to the requirements of the company CIO, you create a Web Form to which you add the following CreateUserWizard server control.
<asp:CreateUserWizard runat="server" ID="CU1"
FinishCompleteButtonText="Continue"> <WizardSteps> <asp:CreateUserWizardStep ID="CWS1" Runat="server"
Title="New Account"/> <asp:WizardStep ID="CWS2" Title="More Info" StepType="Step"> Given Name:<asp:TextBox runat="server" ID="txtGivenName" />
Last Surname:<asp:TextBox runat="server" ID="txtSurname" />
</asp:WizardStep>
<asp:CompleteWizardStep ID="CWS3" Runat="server"
Title="Complete"/>
</WizardSteps>
</asp:CreateUserWizard>
Now you have to write the segment code. After users click the Continue button on the last page, the code should redirect users to the first page of the wizard. In the options below, which code segment should you use?

Correct Answer: A
Question 3
You work as the developer in an IT company. Recently your company has a big customer. The customer runs a large supermarket chain. You're appointed to provide technical support for the customer. Now you are creating an application. No body can run the application except members of the Administrator group are allowed to run it by using the credentials of the end user. You protect sensitive data within the application by writing the following security code.
bool isAdmin = false;
WindowsBuiltInRole role = WindowsBuiltInRole.Administrator;
...
if (!isAdmin)
throw new Exception("User not permitted");
In order to make sure that if a user who is not a member of the Administrator group runs the apllication, the application throws an exception, a code segment should be added to this security code.
In the options below, which code segment should you use?

Correct Answer: C
Question 4
You work as the developer in an IT company. Recently your company has a big customer. The customer runs a large supermarket chain. You're appointed to provide technical support for the customer. You create a Web site. Then you create a master page which serves as the template for articles on your Web site. The master page is named Article.master and uses the following page directives.
<%@ Master Language="C#" Src="~/article.master.cs" Inherits="article" %>
A content page which uses the master page as a template has to be created. Besides this, you have to use a single master page for all devices that access the Web site. In the options below, which code segment should you use?

Correct Answer: B
Question 5
You have just graduated from college, now you are serving the internship as the software developer in an international company. According to the requirements of the company CIO, you??re creating a Web application which displays data by using a GridView control. For the Web application, you drag and drop tables from the Data Connections tree in Server Explorer build Web Forms.
The following is the Add Connection dialog box. (Click the Exhibit button.) You have to use this to add a connection to your data. You have to create the data source objects, so you need to configure the .NET Data Provider that you use to achieve this.
What should you do?

Correct Answer: B
Question 6
You work as the developer in an IT company. Recently your company has a big customer. The customer runs a large supermarket chain. You're appointed to provide technical support for the customer. Now according to the customer requirement, for a Web site, you create a personalized home page by using a series of Web Parts. The Web site does not use a master page. You have to enable the Web Parts to communicate with one another. Which control should you add to the personalized home page?

Correct Answer: A
Question 7
You have just graduated from college, now you are serving the internship as the software developer in an international company. Now you are managing user accounts for a Web site by using the ASP.NET membership APIs. The definition for the membership provider is contained in the Web.config file. You create a PasswordReset.aspx file after modifying the Web.config file to enable password recovery. Users must reset their passwords online. And after the users have logged on through the Login.aspx page, the new passwords must be sent to them by e-mail. Besides this, before users reset their passwords, users must be required to answer their secret questions. Which code logic should you use?

Correct Answer: A
Question 8
You have just graduated from college, now you are serving the internship as the software developer in an international company. There's a Web site that uses custom Themes. Your Web site must support additional Themes based on the user's company name. When a user logs on to the Web site, the company named is set. The company's Theme name is stored in a variable named ThemeName. You have to dynamically set the Web site's Theme by using this variable. So what should you do?

Correct Answer: C
Question 9
You have just graduated from college,now you are serving the internship as the software developer in an international company. According to the requirements of the company CIO, a Queue named q has to be created. So you have to create a method to achieve this. Which code segment should you use?

Correct Answer: A