PrepAway - Latest Free Exam Questions & Answers

Author: admin

What code segment should you add for the PowerTools.vb code-behind page?

You are developing a product page named Category.aspx for Web application that will be integrated into Domain.com’s existing e-Commerce Web site. The Category.aspx page accesses data from the CKProducts database. You use a stored procedure named sp_GetProductsByCategory to display data in a GridView control named _gridView. The stored procedure is shown in the following exhibit.

The Category.aspx page displays products belonging to a particular category that the customers select. The category is passed as a parameter from a DropDownList control.
You want to create a PowerTools.aspx page that displays all power tools in the CKProducts database. The CategoryID for power tools is listed as 102 in the CKProducts database. You want to use a SqlCommand instance to execute the sp_GetProductsByCategory stored procedure to return the appropriate data from the CKProducts database.
exhibit What code segment should you add for the PowerTools.vb code-behind page?

Which code segment should you use to declare the control on the Web Form?

Exhibit:

You develop a Web control to manage credit card information. The Web control is shown in the exhibit.
You register the control on the Web Form by using the following code segment.

<%@ Register Assembly="CreditCardUserDetails"
Namespace="CreditCardUserDetails" TagPrefix="cc1" %>

You need to declare the control on the Web Form.
Which code segment should you use?

What should you do add input controls to the wizard steps?

You are developing a Web application for Domain.com’s existing Web site. The Web application allows for the administration and maintenance of the Domain.com Web site. The Web application contains a users.aspx page that allows administrators to manually create user accounts for the Domain.com Web site. You add a CreateUserWizard control to the users.aspx page and you do not alter any of the control’s properties.
You must add input controls to the wizard steps. However, the input controls that allow administrators to enter user information must be inserted before the Security Question and Security Answer input controls.
What should you do?

What should you do to configure IIS to allow user access to the files through the Web application?

The Web application accesses files that are secured by NTFS permissions and are located in a folder named Projects.
Several Domain.com users that have permissions to the files and are able to access the files through the corporate network, report that they cannot access the files through the Web application. You open the Web.config file for the Web application and notice the elements shown in the following exhibit.

<identity impersonate="true"/>
<authentication mode="Windows"/>

You need to configure IIS to allow user access to the files through the Web application.
What should you do?

What should you do to implement a login page that authenticates users against the CKWebUsers database?

You work as a Microsoft ASP.NET developer at Domain.com. The Domain.com network contains an Oracle database server named Certkiller -DB01. Certkiller -DB01 hosts a database named CKWebUsers. Domain.com uses the Microsoft Visual Studio .NET 2005 as their application development platform. You use a Microsoft Windows XP Professional client computer named Certkiller -WS528 as your development computer. Internet Information Services (IIS) is installed on Certkiller -WS528.
You are developing a Web application for Domain.com’s extranet Web site. The extranet Web site is accessed by Domain.com users as well as some of Domain.com’s suppliers and affiliates. All users that must access the Web application have their credentials stored in the CKWebUsers database. You want to implement a login page that authenticates users against the CKWebUsers database.
What should you do?

What control should you add a control to the ZoneTemplate element of the EditorZone control?

You are developing a Web application that enables the administration and management of the existing Domain.com Web site. The Web application has a page named subcategories.aspx that contains a WebPart control named _productsWebPart. The _productsWebPart WebPart control has a property named _category of type String. You apply the WebBrowsable attribute to the _category property. You also add an EditorZone control to the subcategories.aspx page. The code for the EditorZone control is shown in the following exhibit.

<asp:EditorZone ID="_editorZone" Runat="Server">
<ZoneTemplate>
</ZoneTemplate>
</asp:EditorZone>

You must add a control to the ZoneTemplate element of the EditorZone control to allow users to edit the _category property.
What control should you add?

What code segment should you use to add code to the subcategories.aspx page that connects the two WebPart cont

You are developing a Web application that enables the administration and management of the existing Domain.com Web site. The Web application has a page named subcategories.aspx that makes use of WebParts. The code for the WebPart is shown in the following exhibit.

<asp:WebPartZone ID="_webPartZone" Runat="Server"> <ZoneTemplate>
<custom:CategoryWebPart ID="_category" Runat="Server" /> <custom:SubcategoryWebPart ID="_subcat" Runat="Server" /> </ZoneTemplate>
</asp:WebPartZone>

The CategoryWebPart control displays a list of product categories from the CKProducts database. The administrator can either select categories from a DropDownList or manually enter a category in a TextBox. The SubcategoryWebPart control displays the subcategories that belong to the category specified in the CategoryWebPart control. You modify the Web.config file to allow the SubcategoryWebPart control to use the category entered or selected in the CategoryWebPart control. You now need to add code to the subcategories.aspx page that connects the two WebPart controls every time the page is loaded.
What code segment should you use?

What should you do to associate Button controls on the Web application’s default.aspx page?

You are developing a Web application that that implements themes. You create a theme named BasicTheme that contains two skin files named default.skin and alt.skin. The default.skin file represents the default skin file for all controls in the Web application. You want to associate Button controls on the Web application’s default.aspx page with a non-default skin.
What should you do?

What code segment should you use to override the CreateChildControls method to accomplish this?

You are developing a custom control named ProductsGrid that will be used in the redevelopment of Domain.com’s e-Commerce Web applications. The ProductsGrid control contains a TextBox control and a DropDownList control that allows for the editing of product descriptions. The code for the ProductsGrid control is shown in the following exhibit.

[ParseChildren(True)]
public class ProductsGrid : Control, INamingContainer {
private Desc _desc;
private ITemplate _descTemplate;
public Desc Desc
{
get{return _desc;}
set{_desc = value;}
}
[TemplateContainer(typeof(DescTemplateContainer))] public ITemplate DescTemplate
{
get{return _descTemplate;}
set{_descTemplate = value;}
}
protected override void CreateChildControls()
{
// TO DO
}
}
public class DescTemplateContainer : Control, INamingContainer {
private Desc _desc;
public DescTemplateContainer(Desc desc)
{
_desc = desc;
}
public Desc Desc
{
get { return _desc;}
set { _desc = value;}
}
}
You need to ensure that the content specified in the DescTemplate() property is rendered by the ProductsGrid control. You need to override the CreateChildControls method to accomplish this.
What code segment should you use?