|
Question |
Rating |
View Answer |
|
You create an ASP.NET application to provide online order processing to XYZ customers. A page named ShippingInformation.aspx contains a Web Form with controls for collecting shipping location information. The Web Form contains the following elements: • Four TextBox controls for entry of name, street address, city, and postal code. • A DropDownList control that consists of the full names of 150 countries. • A Button control named shipItButton. The Click event handler for shipItButton is located in the code-behind file for ShippingInformation.aspx. None of the other controls on the Web Form define server-side event handlers. The Click event handler for ShipItButton redirects the user to a page named ShippingConfirmation.aspx. The ShippingConfirmation.aspx page provides the confirmation status of the shipping request submission to the user. Users who access the application by using dial-up connections report that ShippingInformation.aspx processes very slow after the user clicks the shipItButton. Users on high-bandwidth network connections do not report the same issue. You need to decrease the delay experienced by the dial-up users. What should you do? A. Add the following attribute to the Page directive for ShippingInformation.aspx: EnableViewState=”False” B. Add the following attribute to the Page directive for ShippingInformation.aspx: SmartNavigation=”True” C. Add the following attribute to the OutputCache directive for ShippingInformation.aspx: Location=”server” D. Add the following attribute to the OutputCache directive for ShippingInformation.aspx. Location=”client”
|
|
View Answer |
|
You are creating an e-commerce site for XYZ. Your site is distributed across multiple servers in a Web farm. Users will be able to navigate through the pages of the site and select products for purchase. You want to use a DataSet object to save their selections. Users will be able to view their selections at any time by clicking a Shopping Cart link. You want to ensure that each user’s shopping cart DataSet object is saved between requests when the user is making purchases on the site. What should you do? A. Create a StateBag object. Use the StateBag object to store the DataSet object in the page’s ViewState property. B. Use the HttpSessionState object returned by the Session property of the page to store the DataSet object. Use the Web.config file to configure an out-of-process session route. C. Use the Cache object returned by the page’s Cache property to store a DataSet object for each user. Use an HttpCachePolicy object to set a timeout period for the cached data. D. Use the Session_Start event to create an Application variable of type DataSet for each session. Store the DataSet object in the Application variable.
|
|
View Answer |
|
You create an ASP.NET page named XYZCalendar.aspx that shows scheduling information for projects in your company. The page is accessed from various other ASP and ASP.NET pages hosted throughout the company’s intranet. All employees on the intranet use Internet Explorer. XYZCalendar.aspx has a Calendar control at the top of the page. Listed below the Calendar control is detailed information about project schedules on the data selected. When a user selects a date in the calendar, the page is refreshed to show the project schedule details for the newly selected date. Users report that after viewing two or more dates on XYZCalendar.aspx, they need to click the browser’s Back button several times in order to return to the page they were viewing prior to accessing XYZCalendar.aspx. You need to modify XYZCalendar.aspx so that the users need to click the Back button only once. What should you do? A. Add the following statement to the Page.Load event handler for XYZCalendar.aspx: Response.Expires(0); B. Add the following statement to the Page.Load event handler for XYZCalendar.aspx: Response.Cache.SetExpires (DateTime.Now()); C. Add the following attribute to the Page directive for XYZCalendar.aspx: EnableViewState=”True” D. Add the following attribute to the Page directive for XYZCalendar.aspx: SmartNavigation=”True”
|
|
View Answer |
|
You are creating an ASP.NET page for XYZ. The page uses string concatenation to gather data from multiple e-mail messages and format the data for display on the page. You want to ensure that the page displays as quickly as possible. What should you do? A. Write code that uses the Append method of the StringBuilder object. B. Write code that uses the Substring method of the String object. C. Write code that uses the Concat method of the String object. D. Write code that uses the plus-sign (+) operator to concatenate the strings.
|
|
View Answer |
|
You are creating an ASP.NET page to retrieve sales data from a Microsoft SQL Server database. You are writing a method named GetXYZSales to run a stored procedure in the SQL Server database. The stored procedure has one input parameter that is used to specify a product. The stored procedure returns to the year-to-date sales for that products. You declare a numeric variable in the GetXYZSales method. You want to assign the return value of the stored procedure to the variable. What should you do? A. Create a SqlDataAdapter object and call its Fill method to run the stored procedure and assign the year-to-date sales value to your numeric variable. B. Create a SqlDataAdapter object and call its Update method to run the stored procedure and assign the year-to-date sales value to your numeric variable. C. Create a SqlCommand object and call its ExecuteScalar method to run the stored procedure and assigns the year-to-date sales value to your numeric variable. D. Create a SqlCommand object and call its ExecuteReader method to run the stored procedure and assign the year-to-date sales value to your numeric variable.
|
|
View Answer |
|
You are developing an ASP.NET application for XYZ’s intranet. Employees will use the application to administer their employee benefits. The benefits information is stored in a Microsoft SQL Server database named Benefits. An employee can select benefits options from 10 different drop-down list boxes. The values for each list are stored in separate tables in the Benefits database. The values that are available for employees to choose can change once each year during the benefits enrollment period. You want to minimize the number of times your application must access the Benefits database to obtain the values for the drop-down list box. Which two courses of action should you take? (Each correct answer presents part of the solution. Choose two) A. Create one stored procedure that returns the result for all 10 drop-down list boxes. Create one DataTable object for each of the 10 drop-down list boxes. Use a SqlDataReader object to populate 10 DataTable objects by calling the NextResult() method. Bind the drop-down list boxes to the DataTable objects. B. Create a stored procedure that returns the result set for all 10 drop-down list boxes. Bind the drop-down list boxes to the DataReader object. C. Create one DataTable object for each of the 10 drop-down list boxes. Create a stored procedure for each of the 10 tables. Use a SqlDataReader object to populate the 10 DataTable objects. Bind the drop-down list boxes to the DataTable objects. D. Store the result sets for the 10 drop-down list boxes in a DataSet object. Add the DataSet objects to the Cache object for the application.. E. Store the result sets for the 10 drop-down list bikes in a file on the user’s computer by using the DataSet.WriteXml() method.
|
|
View Answer |
|
You ASP.NET application manages order entry data by using a DataSet object named EXorderEntry. The EXorderEntry object includes two DataTable objects named orderNames and OrderDetails. A ForeignKeyConstraint object named orderDetailsKey is defined between the two DataTable objects. You attempt to delete a row in orderNames while there are related rows in OrderDetails, and an exception is generated. What is the most likely cause of the problem? A. The current value of OrderDetails.KeyDeleteRule is Rule.Cascade. B. The current value of OrderDetails.KeyDeleteRule is Rule.SetNull. C. The current value of OrderDetails.KeyDeleteRule is Rule.SetDefault. D. The current value of OrderDetails.KeyDeleteRule is Rule.None. |
|
View Answer |
|
You create an ASP.NET page that uses images to identify areas where a user can click to initiate actions. The users of the application use Internet Explorer. You want to provide a pop-up window when the user moves the mouse pointer over an image. You want the pop-up window to display text that identifies the action that will be taken if the user clicks the image. What should you do? A. For each image, set the AlternateText property to specify the text you want to display, and set the ToolTip property to True. B. For each image, set the ToolTip property to specify the text you want to display. C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent() method of the System.Web.UI.WebControls.Image class. D. In the onmouseover event handler for each image, add code that calls the ToString() method of the System.Web.UI.WebControls.Image class.
|
|
View Answer |
|
You are configuring security for your ASP.NET application. The folders for your pages are located in a hierarchy as shown in the exhibit. You need to allow all uses to access pages located in the Products folder and the Orders folder. You need to allow any members of the Accounting role to access pages located in the Accounting folder. What are two possible waves achieve this goal? (Each correct answer presents a complete solution. Choose two) A. Add code to the Global.asax file to dynamically configure access to the Accounting folder.. B. Place the authorization settings for all roles in the Web.config file located in the Products folder. Use the location tag in the Web.config file to deny access to the Accounting folder for all roles except the Accounting role. C. Place the authorization settings for all roles in the Web.config file located in the Products folder. Allow access for only members of the Accounting role in the Web.config file located in the Accounting folder. D. Create two custom roles in the Machine.config file for the application. Configure one role for all users, and one role for the Accounting users. Deny access to the Accounting folder for all users except members of the Accounting role.
|
|
View Answer |
|
ou are creating an ASP.NET application that uses the Microsoft SQL Server .NET Data Provider to connect to XYZ’s database. Your database administrator reports that, due to heavy usage of the application, data requests are being blocked while users wait for new connections to be created. You want to improve throughput by setting a minimum connection pool size of 10. What should you do? A. Add a connection element under an appSettings element in the Web.config file for your application, and specify a minimum size of 10 for the connection pool. B. Add a connection element under an appSettings element in the Machine.config file on your Web server, and specify a minimum size of 10 for the connection pool. C. Add a Min Pool Size property to the connection string you use when opening a connection, and specify a minimum size of 10 for the connection pool. D. Add a Min Pool Size property to your ADO.NET connection objects, and assign a value of 10 to the property.
|
|
View Answer |
|
You are a Web developer for XYZ. You create an ASP.NET application that accesses sales and marketing data. The data is stored in a Microsoft SQL Server 2000 database on a server named XYZ01. The company purchases a factory automation software application. The application is installed on XYZ01, where it creates a second instance of SQL Server 2000 named Factory and a database named FactoryDB. You connect to FactoryDB by using Windows Integrated authentication. You want to add a page to your ASP.NET application to display inventory data from FactoryDB. You use a SqlConnection object to connect to the database. You need to create a connection string to FactoryDB in the instance of SQL Server named Factory on XYZ01. Which string should you use? A. “Server=XYZ01;Data Source=Factory; Initial Catalog=FactoryDB;Integrated Security=SSPI” B. “Server=XYZ01;Data Source=Factory; Database=FactoryDB;Integrated Security=SSP1” C. “Data Source=XYZ01Factory; Initial Category=Factory; Integrated Security=SSP1” D. “Data Source=XYZ01Factory; Database=FactoryDB; Integrated Security=SSP1”
|
|
View Answer |
|
You are creating an ASP.NET application for XYZ. Customers will use this application to manage their own insurance policies. For example, a customer can use the application to renew policies. An existing COM component named XYZPolicyLibrary.dll contains the logic for calculating the renewal premium. XYZPolicyLibrary.dll is written in Visual Basic 6.0. The class that performs the calculations is named cPolicyActions. The CalculateRenewal function of cPolicyActions accepts a policy identification number and returns a premium as a Double. You need to use XYZPolicyLibrary.dll in your ASP.NET application. You also need to enable the application to use the cPolicyActions class. What should you do? A. Run the following command in a command window: TLBIMP.EXE XYZPolicyLibrary.DLL /out:XYZPolicyLibrary.NET.DLL Copy the original XYZPolicyLibrary.dll to the /bin directory of your ASP.NET application. B. Run the following command in a command window: TLBEXP.EXE XYZPolicyLibrary.DLL /out:XYZPolicyLibrary.NET.DLL Copy the original XYZPolicyLibrary.dll to the /bin directory of your ASP.NET application. C. Select Add Existing Item from the Project menu in Visual Studio .NET and browse to XYZPolicyLibrary.dll. D. Select Add Reference from the Project menu in Visual Studio .NET, select the COM tab, and browse to XYZPolicyLibrary.dll.
|
|
View Answer |
|
You are a member of a team of developers creating several ASP.NET applications for XYZ. You want to create a reusable toolbar that will be used in each of the applications. The toolbar will be displayed at the top of each page viewed by the user. The contents of the toolbar will vary depending on options each user selects when creating a profile. You want to be able to add the toolbar to the ASP.NET toolbox for each of the developers on your team. What should you do? A. Create a new Web Control Library project. Create the toolbar within a Web custom control. B. Add a new Web user control to your ASP.NET project. Create the toolbar within the Web user control. C. Add a new Web Form to your ASP.NET project. Design the toolbar within the Web Form and save the Web Form with an .ascx extension. D. Add a new component class to your ASP.NET project. Design the toolbar within the designer of the component class.
|
|
View Answer |
|
You are creating an ASP.NET application to track XYZ sales orders. The application uses an ADO.NET DataSet object that contains two DataTable objects. One table is named Orders, and the other table is named OrderDetails. The application displays data from the Orders table in a list box. You want the order details for an order to be displayed in a grid when a user selects the order in the list box. You want to modify these objects to enable your code to find all the order details for the selected order. What should you do? A. Add a DataRelation object to the Relations collection of the DataSet object. B. Use the DataSet.Merge method to connect the Orders table and the OrderDetails table to each other. C. Add a ForeignKeyConstraint to the OrderDetails table. D. Add a keyref constraint to the DataSet schema.
|
|
View Answer |
|
You create an ASP.NET application. The application uses integrated security to retrieve information from a Microsoft SQL Server database named XYZSalesOrder. You need to provide a connection string for the application to use to connect to XYZSalesOrder. You decide to store the connection string in the Web.config file. How should you set up the Web.config file? A. In the configuration section, create an element named appSettings. Create and add element that has a key attribute set to SQLConnection, and a value attribute set to the connection string. B. In the configuration section, create an element named SQLConnection. Create a key element that has a value attribute set to the connection string. C. In the authorization section, create an element named SQLConnection. Create a key element that has a value attribute set to the connection string.D. In the authentication section, create an element named appSettings. Create an element named SQLConnection that has a value attribute set to the connection string.
|
|
View Answer |
|
ou are creating a new ASP.NET page named ItemList that displays item and price information for many different items. When a user logs on to the Web site, the page retrieves the current list of prices from a database. ItemList will be accessed by several thousand registered users. When a price list is retrieved for a user, the prices remain valid for as long as the user continues to access the page. Users are allowed to keep the same price list for several days. When ItemList is posted back to the server, you want to ensure that the price list was not altered on the user’s computer. You also want to minimize the memory resources consumed on the Web server. Which three parameters should you add to the Page directive in ItemList? (Each correct answer presents part of the solution. Choose three) A. EnableSessionState=”True” B. EnableSessionState=”False” C. EnableSessionState=”ReadOnly” D. EnableViewState=”True” E. EnableViewState=”False” F. EnableViewStateMac=”True” G. EnableViewStateMac=”False”
|
|
View Answer |
|
You create an ASP.NET application. You implement tracing and debugging instrumentation. The application is deployed on XYZ’s intranet. After working with the application for several days, users report that some pages are displaying errors that incorrectly identify valid date values as being invalid. You need to gather debugging information from the application while it is running in the production environment. You need to perform this task with the least impact on the performance of the application. What should you do? A. Enable Debug mode in the application’s Web.config file on the production server. Use Visual Studio .NET on your client computer to select Debug Processes from the Tools menu and attach to the aspnet_wp.exe process on the production server. B. Enable Debug mode in the application’s Web.config file on the production server. Use Visual Studio .NET on your client computer to open the application project on the production server and select Start from the Debug menu. C. Enable application tracing and disable tracing page output in the application’s Web.config file on the production server. View the debugging information on the trace.axd page. D. Enable application tracing and disable tracing page output in the application’s Web.config file on the production server. Run the DbgClr.exe and attach to the aspnet_wp.exe process on the production server.
|
|
View Answer |
|
You are creating a Web site for XYZ. You receive product lists in the form of XML documents. You are creating a procedure to extract information from these XML documents according to criteria that your users will select. When a user makes a request, you want the results of these requests to be returned as quickly as possible. What should you do? A. Create an XmlDataDocument object and load it with the XML data. Use the DataSet property of the object to create a DataSet object. Use a SQL SELECT statement to extract the requested data. B. Create an XmlDataDocument object and load it with the XML data. Use the SelectNodes method of the object to extract the requested data. C. Create an XPathDocument object and load it with the XML data. Call the CreateNavigator method to create an XPathNavigator object. Call the Select method of the XPathNavigator object to run an XPath query that extracts the requested data. D. Create an XmlReader object. Use the Read method of the object to stream through the XML data and to apply an Xpath expression to extract the requested data.
|
|
View Answer |
|
You create an ASP.NET page that allows a user to enter a requested delivery date in a TextBox control named requestEXDate. The date must be no earlier than two business days after the order date, and no later that 60 business days after the order date. You add a CustomValidator control to your page. In the Properties window, you set the ControlToValidate property to requestEXDate. You need to ensure that the date entered in the requestDate TextBox control falls within the acceptable range of values. In addition, you need to minimize the number of round trips to the server. What should you do? A. Set the AutoPostBack property of requestDate to False. Write code in the ServerValidate event handler to validate the date. B. Set the AutoPostBack property of requestDate to True. Write code in the ServerValidate event handler to validate the date. C. Set the AutoPostBack property of requestDate to False. Set the ClientValidationFunction property to the name of a script function contained in the HTML page that is sent to the browser. D. Set the AutoPostBack property of requestDate to True. Set the ClientValidationFunction property to the name of a script function contained in the HTML page that is sent to the browser.
|
|
View Answer |
|
You create an ASP.NET application to provide online order processing to XYZ customers. A page named ShippingInformation.aspx contains a Web Form with controls for collecting shipping location information. The Web Form contains the following elements: • Four TextBox controls for entry of name, street address, city, and postal code. • A DropDownList control that consists of the full names of 150 countries. • A Button control named shipItButton. The Click event handler for shipItButton is located in the code-behind file for ShippingInformation.aspx. None of the other controls on the Web Form define server-side event handlers. The Click event handler for ShipItButton redirects the user to a page named ShippingConfirmation.aspx. The ShippingConfirmation.aspx page provides the confirmation status of the shipping request submission to the user. Users who access the application by using dial-up connections report that ShippingInformation.aspx processes very slow after the user clicks the shipItButton. Users on high-bandwidth network connections do not report the same issue. You need to decrease the delay experienced by the dial-up users. What should you do? A. Add the following attribute to the Page directive for ShippingInformation.aspx: EnableViewState=”False” B. Add the following attribute to the Page directive for ShippingInformation.aspx: SmartNavigation=”True” C. Add the following attribute to the OutputCache directive for ShippingInformation.aspx: Location=”server” D. Add the following attribute to the OutputCache directive for ShippingInformation.aspx. Location=”client”
|
|
View Answer |