You are implementing an ASP.NET Web site. The root directory of the site contains a page named Error.aspx. You need to display the Error.aspx page if an unhandled error occurs on any page within the site. You also must ensure…

You are creating an ASP.NET Web site. The site is configured to use Membership and Role management providers. You need to check whether the currently logged-on user is a member of a role named Administrators. Which code segment should you…

You are implementing custom ASP.NET server controls. You have a base class named RotaryGaugeControl and two subclasses named CompassGaugeControl and SpeedGaugeControl. Each control requires its own client JavaScript code in order to function properly. The JavaScript includes functions that are…

You create a custom server control named Task that contains the following code segment. (Line numbers are included for reference only.) You need to ensure that adding a Task control from the Toolbox creates markup in the following format. <Dev:Task…

You are implementing an ASP.NET page that includes the following drop-down list. You need to dynamically add values to the end of the drop-down list. What should you do? A. Add the following OnPreRender event handler to the asp:DropDownList B.…

You create a Web page named TestPage.aspx and a user control named contained in a file named TestUserControl.ascx. You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code segment should you use? A. B. C. D.

You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. <uc:TestUserControl ID="testControl" runat="server"/> On TestUserControl.ascx, you need to add a read-only member named CityName to return…

You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx. <uc:TestUserControl ID="testControl" runat="server"/> You add the following code to the code-behind file of TestPage.aspx. private void TestMethod() { … } You…

You are implementing an ASP.NET Web site. The site allows users to explicitly choose the display language for the site’s Web pages. You create a Web page that contains a DropDownList named ddlLanguage, as shown in the following code segment.…