What should you do?
You create a Web site with membership and personalization enabled. You must use an existing CRM database for storing the membership information. You need to implement the Membership Provider. What should you do?
Which tool should you use?
You create a Web site. The Web site has many predefined roles and associated users that will be used for security purposes. You need to manage these roles and user accounts. Which tool should you use?
What should you do?
You create a Web site that is for members only. The behavior of the Web site changes according to the role of the user. The Web site uses the ASP.NET Membership control for creation of user accounts. You need to find out whether a user is a member of a particular role. What should you do?
Which code logic should you use?
You are using the ASP.NET membership APIs to manage user accounts for a Web site. The Web.config file contains the definition for the membership provider. After modifying the Web.config file to enable password recovery, you create a PasswordReset.aspx file. You need to enable users to reset their passwords online. The new passwords must be sent to them by e-mail after they have logged on through the Login.aspx page. In addition, users must be required to answer their secret questions before resetting their passwords. Which code logic should you use?
Which code segment should you use?
You create a Web Form. You add the following CreateUserWizard server control to the Web Form.
<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>
You need to write code that redirects users to the first page of the wizard after they click the Continue button on the last page. Which code segment should you use?
which event handler should you write the code?
You create a Web Form. The Web Form allows users to log on to an application. You include a Login control named Login1 on the Web Form. You need to write code in one of Login1’s event handlers. This code must implement your custom logic that validates the user’s credentials. In which event handler should you write the code?
Which two actions should you perform?
You are creating a custom user control. The custom user control will be used on 10 Web Forms for an ASP.NET Web site that allows users to register and log on to a personalized experience. The custom user control uses two TextBox controls and two Button controls. You need to ensure that the controls are visible only when users are not logged on to the Web site. You also need to minimize the amount of effort in development and maintenance for the Web site. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Which code segment should you use?
You create the following Web user control named ErrorMessages.
<%@ Control Language=”VB” AutoEventWireup=”false”
CodeFile=”ErrorMessages.ascx.vb” Inherits=”ErrorMessages” %> <script>
Protected m_Text As String = “This is a default message!”
Public Property Text() As String
Get
Return m_Text
End Get
Set(ByVal value As String)
m_Text = value
End Set
End Property
</script>
The ErrorMessages control uses a public property that displays the error message. You need to change the default error message property on the Web Form in which the control is implemented. Which code segment should you use?
Which code segment should you use?
You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.
Dim ar As IAsyncResult = cmd.BeginExecuteReader()
You need to execute a method named DoWork() that takes one second to run while the SQL query is executing. DoWork() must run as many times as possible while the SQL query is executing. Which code segment should you use?
What should you do?
You are developing a Web application. The Web application uses a GridView control to display data. You build your Web Forms for the Web application by dragging and dropping tables from the Data Connections tree in Server Explorer. You need to add a connection to your data by using the Add Connection dialog box as shown in the exhibit. (Click the Exhibit button.) During the process, you need to configure the .NET Data Provider that you use to create the data source objects.
What should you do?