>Concorsi
>Forum
>Bandi/G.U.
 
 
 
 
  Login |  Registrati 
Elenco in ordine alfabetico delle domande di 70-305: Developing and implementing Web applications with Microsoft Visual Basic .NET and Microsoft Visual Studio .NET

Seleziona l'iniziale:
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

> Clicca qui per scaricare l'elenco completo delle domande di questo argomento in formato Word!


You allow users to edit Customer information on a DataGrid bound to a DataSet. When the user clicks the Update button on the form, you call the SqlDataAdapter.Update method to persist the changes from the DataSet to the underlying database.

Users report that updated records are saved properly, and deleted records are removed, but that new records are missing the next time they run the application. What could be the problem?   The InsertCommand property of the SqlDataAdapter points to a SqlCommand object that does not properly add rows.

You are attempting to debug an ASP.NET application located on your company's production server. The server has the remote debugging components installed, and your local workstation has a full install of Visual Studio .NET. When you attempt to connect to the server process, you receive a DCOM error. What could be the problem?   You are not a member of the Debugger Users group on the server.
You are building a custom control for your company's ASP.NET Web applications. The control will contain the company's privacy policy and copyright notices in a standard set of labels. This control should be shared by multiple applications. Which type of control should you create?   Composite Web custom control
You are converting an existing ASP application to an ASP.NET application. The ASP application uses ADO extensively for data access. You do not yet want to convert the ADO code to ADO.NET code. What should you do to ensure that the ADO objects continue to function properly on the ASP.NET pages?   Use a Page directive to set ASP compatibility mode on the ASP.NET pages.
You are converting an existing HTML and Jscript-based application to use ASP.NET Web Forms instead. Which of these activities is not a good candidate for code in a code-behind file?   Tracking mouse movement over an image and displaying updated text in the browser status bar depending on the mouse location.
You are creating a specialized control that will display text that rotates at an angle specified at design time. This control must be installed into the Visual Studio toolbox so that it can be used in many projects. The control's user interface will resemble that of a Label control, with one additional property named RotationAngle. What sort of control should you create?   Web custom control that inherits from Label.
You are creating an ASP.NET Web application that displays a table representing your company's financial performance over the past eight quarters. The information is grouped into columns and subcolumns. Which attribute can you use in the <th> tags for the table to make it clear to screen readers which data cells the headers are associated with?   scope
You are debugging an ASP.NET application. You want to write the value of a particular variable to a disk file whenever a page is loaded. You only want to record this information during debugging, not after the application has been released. Which object should you use?   System.Diagnostics.Debug
You are debugging your ASP.NET Web application and are concerned about the amount of time that it's taking to render a particular page. Which class can you use to obtain detailed timing information for the events on the page as it is rendered by the ASP.NET engine?   System.Web.TraceContext
You are deploying an ASP.NET application to multiple customer sites. You are not positive that all the bugs have been found in the application, and want to be able to retrieve debugging information from the deployed applications if necessary. You don't want the debugging information to impose any overhead when it's not needed. What should you do?   Include calls to the Trace object in the application. Use a TraceSwitch object to control the output of the Trace object. When you need to debug the application, edit the config file to activate the TraceSwitch object.
You are deploying your ASP.NET application to a single Web server. However, you're preparing to move to a Web farm should traffic justify the additional hardware investment. What should you do to make sure your application is ready to move to a Web farm if need be?   Use either the State Service or SQL Server to store session state.
You are designing a new control for use in ASP.NET applications. The new control will be used to load an image from a disk file to an Image control at runtime. The control will not need a runtime user interface, but it must allow you to select a filename in the Properties window at design time. Which type of control should you create?   Web custom control that inherits directly from WebControl
You are designing a Web Form that will use a Repeater control to display information from several columns of the Employees table in your database. You want to display the column names at the top of the control. Which template should include Label controls with the column names?   HeaderTemplate
You are designing the user assistance for an ASP.NET application that will be available over the Internet. You have no control over the browsers that users will use to view your application. Which form of user assistance can you use with this application?   User assistance displayed as separate Web pages
You are developing a version of your ASP.NET application that will be shipped to a locale that uses right-to-left text ordering. What property should you set for controls on your Web Forms to ensure that they fill in the proper direction?   Set the dir attribute to "rtl" in the HTML tag.
You are developing a Web Form that will be used as part of an online banking application. You have placed a set of RadioButton controls on the form to represent account types. Only one account type should be selected at a time. When you test the Web Form, you discover that you can select multiple account types at the same time, and you cannot deselect an account type after selecting it. How can you fix this problem? (Select two.)   Assign an identical GroupName property value to each of the RadioButton controls.
You are developing a Web Form that will be used as part of an online banking application. You have placed a set of RadioButton controls on the form to represent account types. Only one account type should be selected at a time. When you test the Web Form, you discover that you can select multiple account types at the same time, and you cannot deselect an account type after selecting it. How can you fix this problem? (Select two.)   Replace the RadioButton controls with a RadioButtonList control.
You are developing an application to take orders over the Internet. When the user posts back the order form, you first check to see whether they are a registered customer of your company. If not, you must transfer control to the Register.html page. Which method should you use to effect this transfer?   Response.Redirect
You are developing an ASP.NET application that can display its user interface in English, French, German, or Japanese. What strategy should you use to select the language to display?   Allow the user to select a language by choosing a hyperlink or a selection in a DropDownList.
You are developing an ASP.NET application that will display the strings on its user interface in any of five different languages, depending on the setting of the CurrentThread.CurrentUiCulture property. Where should you store the localized strings so that they can most easily be displayed?   In Assembly resource files
You are implementing server-to-server FTP functionality for use in your ASP.NET applications. You've decided to implement this functionality as a .NET component that inherits directly from the base Component class. How can you create a Transfer method in your component's code?   Implement a Public Sub or Public Function named Transfer.
You are in the process of upgrading an existing ASP application to ASP.NET by converting pages one by one to the new architecture. The application currently uses an ASP.NET page to request the user's first name, which is stored in a session variable with this line of code:

Session("FirstName") = txtFirstName.Text

You run the application and enter a first name on the ASP.NET page. When you browse to an existing ASP page that uses the FirstName session variable, the first name is blank. What could be the problem?   The ASP and ASP.NET engines do not share session state or application state.

You are invoking a Web service that returns a StringBuilder object. Which project requires a reference to the System.Text namespace?   Both the client project and the Web service project.
You are using the command-line Installer tool to install three assemblies, with this command line:

InstallUtil.exe Assembly1.dll Assembly2.dll Assembly3.dll

A problem occurs with the installation of Assembly2.dll, and that assembly cannot be installed. Which assembly or assemblies will be installed on the target machine?   No assemblies will be installed.

You are working with an ASP.NET custom validation control which is required to emit client-side script as part of page processing. Which is the last Page event that you can use to create this script?   Prerender
You have added an EventLogTraceListener object to the Debug.TraceListeners collection so that debug messages are written to the Application event log. You are finished debugging and set your application to the Release configuration. The application contains calls to the Trace object to write tracing messages. In this configuration, where will the trace messages appear?   In both the Output window and in the Application event log.
You have created a new Web service to deliver stock recommendations to your customers. You're working in an ASP.NET project within the Visual Studio .NET environment. What's the easiest way to test your new Web service to make sure that it's returning the proper results?   Run the Web service project and use the test page that it opens in the browser.
You have created a SqlConnection object named SqlConnection1 and a SqlDataAdapter object named SqlDataAdapter1 by dragging the Orders table from your database in Server Explorer and dropping it on a Web Form. You have added a DataGrid control named dgOrders to the Web Form. You have selected the SqlDataAdapter1 object and created a DataSet object named DsOrders1 by using the Generate DataSet dialog box. The Page_Load procedure for your Web Form contains the following code:

Private Sub Page_Load(ByVal sender As System.Object, 
ByVal e As System.EventArgs) Handles MyBase.Load
' Move the data from the database to the DataGrid
dgOrders.DataBind()
End Sub

The Web Form loads without error, but the DataGrid does not display any data. What is the problem?   You neglected to call the Fill method of the SqlDataAdapter object.

You have created a Web custom control that handles file uploading with custom authentication. This control will be used in several of your company's ASP.NET Web applications. Which method should you use for deploying this control?   Merge module
You have created a Web service named MedicalPolicies. Within the Web service class, you have a method named Reimbursables that returns a DataSet object. What must you do to make the information contained in this DataSet object available to clients of the Web service?   Mark the Reimbursables method with the <WebMethod> attribute.
You have created a Web user control named signup.ascx that encapsulates the controls used within your enterprise for newsletter signup forms. Now you want to use this control in other Web applications. What must you do?   Copy the control's files into each application.
You have created an ASP.NET Web Form that displays parts stock information to your customers in a series of DropDownList and ListBox controls. This page is never posted back to your Web server. Which page directive can you use to optimize this page so that it does not download unnecessary data?   EnableViewState = "False"
You have created and tested an ASP.NET application on your local development server. The application makes heavy use of Web server controls, along with static HTML text. Now you have deployed the application to your company's production server via FTP. The production server has IIS 5.0 installed. The pages in the application are displaying in a jumbled fashion, with text present but none of the Web server controls. What could be the problem?   The ASP.NET worker process is not properly installed on the production server.
You have defined a function named DataLoad that makes a list of customers available by returning an ICollection interface. You have an ASP.NET Web Form with a ListBox control named lbCustomers. The Page_Load event handler for the Web Form contains this code:

Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
lbCustomers.DataSource = DataLoad()
lbCustomers.DataTextField = "CustomerName"
End Sub

The Web Form opens without error, but no customer names are displayed. What is the problem?   You have neglected to call the DataBind() method of the page.

You have deployed an ASP.NET application on your company's intranet. Your company has standardized on Internet Explorer 6.0 as the corporate browser. Users complain that when they use the Submit button to send their expense reports in via the application, the focus moves to the first control on the reporting form. This makes it difficult for users to edit their expense reports.

What is the easiest way to maintain focus across postback operations in this application?   Set the SmartNavigation property of the Page class to True.

You have designed a Web Form that includes a DropDownList control with the id of ddlSize. The Items property of the ddlSize control contains the following items:

-
9
10
11
12

The Web Form also contains a RequiredFieldValidator control named rfvSize. You have set the ControlToValidate property of rfvSize to ddlSize. Your goal is to make sure that a non-default value is chosen from ddlSize before the Web Form is posted back to the server. What other property setting must you make on the rfvSize control?   InitialValue = "-"

You have designed a Web Form that uses a DropDownList control to allow the user to select a state containing their shipping address. In the code-behind file for the Web Form, you've implemented an event handler for the SelectedIndexChanged event to update the sales tax amount displayed on the Web Form when a new state is changed.

Users report that the sales tax amount is not updated no matter which state they choose in the DropDownList. What must you do to fix this problem?   Set the AutoPostBack property of the DropDownList control to True.

You have designed an ASP.NET Web form where you need to highlight important information within a table so that it stands out to the user. Which method of highlighting is most accessible?   
<B>
You have developed a Web Form that will display account information to sales representatives. You want your code to respond to the Page's Load event by running a procedure named LoadAccounts, which is defined as follows:
Private Sub LoadAccounts(ByVal sender As System.Object, _
ByVal e As System.EventArgs)

What statement should you use to attach this procedure to the Load event?   

AddHandler Me.Load, AddressOf LoadAccounts
You have developed an ASP.NET Web Form that displays product information from your company's database. The database contains approximately 200 products. Each time the page is displayed, it retrieves information on one product specified by the user.

What type of caching can you use to speed up the delivery of this page?   Varying

You have implemented a Web service that calculates shipping for your company's products and exposed this Web service to the Internet. However, you have removed the UDDI and WSDL files for the Web service. What is the consequence of this action?   The Web service can only be used by applications that have knowledge of its interface.
You have inherited a large ASP.NET application because the original developer has left the company. You are concerned because there does not seem to be sufficient error trapping in the code-behind files to catch all likely errors. What is the easiest way for you to begin tracking all unhandled errors?   Add an Application_Error event handler to the Global.asax file.
You have used the Setup Wizard to create a setup for your ASP.NET Web application and chosen to install a Bootstrapper in the setup. Which of these actions will the Bootstrapper not perform?   Install IIS.
You have written a Visual Basic .NET procedure that opens a database connection using a SqlConnection object, retrieves some information from the database and then closes the connection. The information is retrieved using a stored procedure that may not always be available due to backup schedules. You have wrapped the code to call the stored procedure in a Try/Catch/Finally block. Where should you place the code to close the SqlConnection object?   Inside the Finally block.
Your application connects to a database and adds employee names to a ListBox control in the Page.Load event. Supervisors can edit employee information on this page and submit the edits with a button on the page.

Supervisors report that after they edit an employee's information, each employee name appears twice in the ListBox control. What should you do to fix this problem?   Check the IsPostBack property in the Page.Load event and only add names if IsPostBack is False.

Your application contains a DataSet consisting of patient and physician records. You wish to write this DataSet out to a disk file as an XML document. How should you proceed?   Call the WriteXml method of the DataSet object.
Your application contains the following code:

Dim dr As SqlDataReader = cmd.ExecuteReader()
Dim ? As String
While dr.Read()
? = ? & dr.GetString(0)
End While

What can you do to optimize this portion of the application?   Replace the String object with a StringBuilder object.

Your application includes 4,500 double-precision floating point numbers that you want to write out to a disk file. You'd like to minimize the size of the disk file. Which object should you use to write the file?   BinaryWriter
Your application includes a ListBox control named lbCustomers that displays a list of customers. The DataTextField property of the ListBox is bound to the CompanyName column of the Customers database table. The DataValueField property of the ListBox is bound to the CustomerID column of the Customers database table.

Your form also contains a TextBox control named txtCustomerID. This control uses simple data binding to the ListBox to display the SelectedItem.Value from the ListBox control.

When the user selects a new company name in the ListBox, you wish to display the corresponding CustomerID value in the txtCustomerID control. What should you do?   Call the DataBind method of the TextBox control in the SelectedIndexChanged event of the ListBox.

Your application needs to search for substrings in longer strings. This searching should be culture-aware. What should you use to perform these searches?   CultureInfo.CompareInfo
Your application requires the user to be in the Power Users group to activate certain functions. Which ASP.NET security feature should you use to ensure that the user is in this group?   Role-based security
Your application uses a custom database to hold information on inventory levels. When an exception occurs during database processing, you want to make current database status information available to the Catch block. What should you do?   Derive a custom exception class from the ApplicationException class. Pass the information as properties of the custom exception class.
Your application uses a library of advanced mathematical functions from a third-party developer. This library is implemented as a COM component. You are migrating your application to .NET. What should you do to continue to use the classes and methods within the library?   Obtain a Primary Interop Assembly from the developer of the library. Install the PIA in the Global Assembly Cache.
Your application uses a SqlDataReader object to retrieve monthly shipping data from a SQL Server database. When you find a month with above-average sales, you invoke the ExecuteNonQuery method of a SqlCommand object to insert a row in another table using an INSERT INTO stored procedure.

Calling the ExecuteNonQuery method is causing an error. What is the most likely reason for this error?   You are using the same SqlConnection object for both the SqlDataReader object and the SqlCommand object, and the SqlDataReader is still open when you try to execute the SqlCommand.

Your application uses the GetSystemDirectory API function. This function exists in kernel32.dll in both ANSI and Unicode versions. Your declaration is as follows:

Declare Function GetSystemDirectory Lib "kernel32" ( _
ByVal lpBuffer As String, _
ByRef nSize As Integer) As Integer

Your code is failing with a System.EntryPointNotFoundException exception whenever you call this function. What should you do to fix this failure?   Add the Auto modifier to the declaration.

Your ASP.NET application allows the user to display all the orders that were placed by a particular customer. Your database contains 100 orders and 10 customers. Users of the application might want to see orders from several different customers during the course of a single session. Which ADO.NET object should you use to hold the orders?   DataView
Your ASP.NET application allows the user to input the URL of a Web page, and then applies an XSLT file to show how that Web page looks on a mobile device. What sort of control should you use to validate the TextBox control where the user inputs the URL?   RegularExpressionValidator
Your ASP.NET application contains a Web Form named login.aspx. When this page is posted back to the server, you check the entered username and password against your corporate database. If the username and password match, you wish to display the accountdetails.aspx Web Form as the result in the user's browser. Execution of the application will proceed from that page. How should you transfer control in this case?   Server.Transfer() method
Your ASP.NET application contains this setting in the web.config file:

<identity impersonate="true" name="CORP\Auditing" 
password="Auditing"/>

You are allowing only digest or Windows integrated authentication in IIS. ASP.NET is running under the machine account. What identity will ASP.NET use to authorize resources if a user with the Windows account Shirley in the CORP domain logs in via digest authentication?   CORP\Auditing

Your ASP.NET application includes a Web page named AllErrors.htm that is displayed in response to any error. This page is configured using this code in the web.config file:

<customErrors mode="On"
defaultRedirect="AllError.htm">
</customErrors>

The application includes a login page named Login.aspx. When an error occurs on the login page, you wish to display the page LoginInstructions.htm instead of AllErrors.htm. What should you do?   Add an ErrorPage attribute to the Page directive for Login.aspx. Set the value of this attribute to LoginInstructions.htm.

Your ASP.NET application is running on your company's production Web server. To fix a bug, you've modified one of the ASPX pages that is a part of this application. What must you do to ensure that the production Web server uses the modified page?   Copy the modified ASPX page to the Web server in place of the original page. IIS will automatically use the modified page.
Your ASP.NET application tracks donor contributions for non-profit organizations. Because of the nature of this data, you need to maintain session state even if the Web server crashes and needs to be restarted. Which alternative should you use to store session state for this application?   SQL Server
Your ASP.NET page displays the orders for a particular customer in a DataGrid control. The orders are retrieved by constructing an ad-hoc SQL statement with a WHERE clause that specifies the customer. The application uses a SqlConnection object to connect to the database. The SQL statement is used to fill a DataSet, which is bound to the DataGrid control. What can you do to optimize this portion of your application? (Select two.)   Replace the ad-hoc SQL statement with a stored procedure.
Your ASP.NET page displays the orders for a particular customer in a DataGrid control. The orders are retrieved by constructing an ad-hoc SQL statement with a WHERE clause that specifies the customer. The application uses a SqlConnection object to connect to the database. The SQL statement is used to fill a DataSet, which is bound to the DataGrid control. What can you do to optimize this portion of your application? (Select two.)   Replace the DataSet object with a SqlDataReader object.
Your ASP.NET Web Form displays ordering information for 62 products in a DataGrid control. Your company is as yet unable to accept Web orders, so there are no controls on the page to post the data back to the server. What can you do to optimize the delivery of this page?   Disable ViewState for the DataGrid control.
Your ASP.NET Web Form includes a DataGrid control that contains data the user may wish to edit. You need to maintain the information in this control across page postbacks to the server. The information is not needed by any other page in the application. Which state management technique should you use for this control?   ViewState
Your company supplies a COM component to provide network connectivity services and peer-to-peer file sharing. Some of your clients are moving to .NET, and require a Runtime Callable Wrapper for your component. How should you proceed?   Use the Type Library Importer to create and sign a Primary Interop Assembly for your component.
Your user would like to see German dates and currencies displayed in an application but wants the user interface to remain in English. How can you accomplish this?   Set the CurrentCulture property to a CultureInfo representing the de-DE culture, and set the CurrentUICulture property to a CultureInfo representing the en-US culture.
Your Web application is used to display product information from your company's database. The application consists of a set of pages, each of which uses ADO.NET objects to display data from a SQL Server database. No page in the application passes any information to another page in the application. Which alternative should you use for session state in this application to maximize performance?   <@% EnableSessionState=False %>
Your Web application provides information on your company's shipping policies. Users can select a region of the country from a ListBox control, and are then shown a list of all the shipping choices for that region. The list is stored in a database, and changes very infrequently. You are concerned about the performance of the application when the Web server is under very heavy load. Which of these actions should you take to improve application performance?   Use caching with the VaryByParam attribute to hold the delivered page in memory between requests.
Your Web application uses a frame set to organize information. What must you do to comply with Section 508 accessibility guidelines?   Provide Title text for each frame.