Answer Key

1. A

2. C

3. B

4. C

5. A

6. A and C

7. C

8. A

9. B

10. C

11. B

12. D

13. B

14. C

15. A

16. E

17. B

18. B

19. A

20. C

21. D

22. C

23. C

24. B

25. B

26. D

27. D

28. C

29. A

30. A

31. C

32. C

33. A and D

34. D

35. A

36. A

37. A

38. C

39. D

40. B

41. D

42. B

43. C

44. D

45. A, B, and E

46. C and D

47. A and E

48. C

49. C and D

50. A

51. D

52. B and D

53. A

54. A and D

55. D

56. B

57. D

58. D

59. D

60. D

Question 1

The correct answer is A. The protected modifier limits member access to the class containing the member and to subclasses of that class. Answer B is incorrect because the public modifier allows any class to call the member. Answer C is incorrect because the private modifier limits access to the defining class only. Answer D is incorrect because the internal modifier limits access to classes within the same project, whether they are derived from the defining class.

Question 2

The correct answer is C. When the AutoEventWireup attribute is set to true , ASP.NET automatically registers the Page_Load() method as an event handler for the Load event of the Page class. You also explicitly attach the Page_Load() method to the Load event of the page in the OnInit() method. Therefore, the drop-down list is populated twice because the Page_Load() method is executed twice. Setting the AutoEventWireup to false avoids auto-event wiring for Page event handlers. Answer A is incorrect because the EnableViewState attribute is used to indicate whether the view state should be enabled and has no control over executing the event handlers. Answer B is incorrect because the SmartNavigation attribute is used to remember the control focus on a postback and implement other navigation features on a Web page. Answer D is incorrect because, if the drop-down list control is populated on page postback, the drop-down list does not display any values when the page is first displayed; also, multiple postbacks add multiple values in the drop-down list.

Question 3

The correct answer is B. Setting the TabIndex property of the control to a negative value removes the control from the tab order. Answer A is incorrect because controls with a TabIndex of also participate in the tab order. Answer C is incorrect because AccessKey only provides a shortcut key for quick navigation to the control; setting it to null has no impact on the tab order. Answer D is incorrect because, if you set the Enabled property of the control to false , it cannot get the focus under any circumstances.

Question 4

The correct answer is C. The AlternateText property specifies the text that is displayed in place of the Image Web server control when the image is being downloaded, the image is unavailable, or the browser doesn't support images. Answer A is incorrect because the ToolTip property is only used to display ToolTips for the image. Answer B is incorrect because the Attributes property represents a collection of name /value pairs that is rendered to the browser in the opening tag of the control. Answer D is incorrect because the ImageUrl property is used to specify the URL of the image.

Question 5

The correct answer is A. You would use two CompareValidator controls ”one control to compare that the value in the control txtQuote is greater than or equal to txtPrevQtrMin , and the other control to compare that txtQuote is less than or equal to txtPrevQtrMax . Answer B is incorrect because the RangeValidator control is used to perform range validations only on the fixed values set to its MinimumValue and MaximumValue properties. Only the CompareValidator control enables you to compare and validate controls based on the values of other controls. Answer C is incorrect because the CustomValidator control requires writing more code. Answer D is incorrect because the RegularExpressionValidator control is used to ensure that the input control's value is in a specified pattern.

Question 6

The correct answers are A and C. The RequiredFieldValidator control lets you check that the URL is entered in the input control, and the RegularExpressionValidator control lets you check that the URL is in the proper format. Answer B is incorrect because the RangeValidator control lets you check that the data is within a specific range in the input control. Answer D is incorrect because CompareValidator lets you compare the data against a given value or another input control's value.

Question 7

The correct answer is C. When you have multiple catch blocks associated with a try block, you must write them in order from specific to general. The catch block corresponding to the ArithmeticException should come at the end because it is more general compared to the other three. In fact, the DivideByZeroException , NotFiniteNumberException , and OverFlowException classes are derived from ArithmeticException . Answers A, B, and D are incorrect because they do not place the catch blocks in order of specific to general exceptions.

Question 8

The correct answer is A. The SqlException.Class property gets a value from 1 to 25 that indicates the severity level of the error. Answer B is incorrect because the SqlException.Source property gets the name of the provider that generated the error. Answer C is incorrect because the SqlException.Server property gets the name of the computer running the instance of SQL Server that generated the error. Answer D is incorrect because the SqlException.State property gets a numeric error code from SQL Server that represents an error, warning, or "no data found" message.

Question 9

The correct answer is B. The configuration settings most local to the requested page control the response of ASP.NET. In the case of /custom/remote/NonExistingPage.aspx , the configuration file in the /custom directory is applied, which disables custom error pages. Therefore, answers A, C, and D are incorrect.

Question 10

The correct answer is C. The Server.Transfer() method provides a quick way to switch to ASPX pages in the ASP.NET application. Answer A is incorrect because the HyperLink control cannot be used to transfer control to other pages programmatically. Answer B is incorrect because the Response.Redirect() method causes an extra roundtrip between the server and the client to transfer control to another page. Answer D is incorrect because the Server.Execute() method executes the specified ASPX page and returns the control to the calling ASPX page.

Question 11

The correct answer is B. Setting the BufferOutput property to true enables the output to the response stream to be buffered until the entire page is processed . Therefore, you should call the Clear() method to clear the entire response stream buffer created until the file was not found. Answer A is incorrect because the Flush() method flushes the currently buffered content out to the client. Answer C is incorrect because the Close() method closes the HTTP response object and the socket connection to the client. Answer D is incorrect because the End() method stops the execution of the page after flushing the output buffer to the client.

Question 12

The correct answer is D. By default, When ASP.NET executes a page, it saves a copy of all nonpostback controls in the hidden __VIEWSTATE control. Because the page will not be posted back, you don't need this information. Therefore, you can disable view state for the entire page and make the page smaller so that it can be delivered more quickly. Answers A and B are incorrect because they enable the view state, which would store the data of controls in the __VIEWSTATE control and make the page bulky. Answer C is incorrect because it disables view state only for the DataGrid control rather than the whole page.

Question 13

The correct answer is B. Because different computers in a Web farm might serve multiple page requests during a session, you need to store any session state information in a shared repository outside the ASP.NET worker process. Answer A is incorrect because you can use session state in a Web farm configuration. Answer C is incorrect because view state is used to store data related to a page rather than a user session. Answer D is incorrect because the HttpRequest , HttpResponse , and HttpServerUtility objects can be used in a Web farm configuration.

Question 14

The correct answer is C. Session and application state are not shared between ASP and ASP.NET pages. If you set a session or application variable in ASP.NET code, there's no way to retrieve it from ASP code, and vice versa. Answer A is incorrect because the Page.Session property provides only a mechanism to get its value; you cannot set the value of this property. Answer B is incorrect because the ASP.NET Session object is not available in the ASP pages. Answer D is incorrect because cookies are required not just for ASP but also for ASP.NET.

Question 15

The correct answer is A. When a user visits the site, the browser establishes a new session with the Web server. At that time, the Session_Start() event handler is executed. This method is executed only once for the user session and is an appropriate choice for the case in question. Answer B is incorrect because Application_BeginRequest() works for every HTTP request and not just the first request. Answer C is incorrect because the Page_Load() event handler of default.aspx might not work in all cases. This is because the user can enter the Web site through a page other than default.aspx . Answer D is incorrect because the Application_Start() event handler redirects only the first user of the application.

Question 16

The correct answer is E. The DataSet object contains product details that are global to the application and needs to be expired every two hours. The best place to store application data is the application data cache ”the Cache object. The data cached in the data cache can be set to expire in a fixed amount of time or by using sliding expiration. Answer A is incorrect because application state is used to store data global to the application but it cannot expire after a fixed amount of time or offer the other features of the Cache object. Answer B is incorrect because session state is used to store user-specific data; if session state is used to store the DataSet object, multiple copies of the DataSet object are created for each user, hindering the performance. Further, the data in session state cannot expire in a fixed amount of time. Answer C is incorrect because it is used to store only page-specific data on the client side. Answer D is incorrect because the HttpCachePolicy object is used to store the HTML output of Web pages rather than the data.

Question 17

The correct answer is B. The Duration and VaryByParam attributes must be specified when an OutputCache directive is applied to an ASPX page. The Duration attribute specifies the period in seconds for which the page should be cached, and if the output does not vary by any parameters, none should be passed to the VaryByParam attribute. Answers A and C are incorrect because the Duration attribute specifies the time in seconds. Answer D is incorrect because the required VaryByParam attribute is missing.

Question 18

The correct answer is B. Because the page accepts other information and the output changes for every state and park selected by the user, you should supply the VaryByParam attribute with ddlStates;ddlParks to cache different versions of the pages for every state and park selected. Answer A is incorrect because the page accepts other information and it would cache all the possible versions of the Web page. Answer C is incorrect because it would cache only on the basis of the park, regardless of the state. Therefore, if two states have parks with the same name, the cache would contain output on only the first park selected by the user. Answers D, E, and F are incorrect because the VaryByControl attribute is applied only in user controls, rather than ASPX pages.

Question 19

The correct answer is A. The ApplyDefaultSort property is used to automatically create a sort order, in ascending order, based on the primary key of the table. The ApplyDefaultSort property applies only when the table has a primary key defined and the Sort property is a null reference or an empty string. Answer B is incorrect because you want to sort using the primary key and for that you should set the ApplyDefaultSort property to true . Answer C is incorrect because you need to sort the data instead of filtering the data. Answer D is incorrect because the given code segment is incorrect: You must specify the name of a column in the Sort property along with ASC or DESC .

Question 20

The correct answer is C. Setting the RowStateFilter property of the DataView object to DataViewRowState.Deleted specifies that you want to view the deleted rows from the original data. Answers A and B are incorrect because the RowFilter property is used to filter rows based on an expression rather than the row states. Answer D is incorrect because setting the RowStateFilter property to DataViewRowState.OriginalRows displays the original data of all the rows, including the deleted rows.

Question 21

The correct answer is D. To display values from an array in a ListBox control, you must set the DataTextField property of the control to a string containing the name of the field. Answers A and C are incorrect because they use the DataValueField property instead of the DataTextField property. The DataValueField property is used to set the value associated with the items in the ListBox control, but this property is not displayed in the control. Answer B is incorrect because the property name of the data source must be specified as a string.

Question 22

The correct answer is C. When you use the Close() method on an SqlConnection object, the connection is closed, all pending database transactions are rolled back, and the connection is returned to the connection pool. Answer A is incorrect because reusing an instance after you have called the Dispose() method can result in undesirable effects. If you think you might want to reuse the connection instance, you should use the Close() method rather than the Dispose() method. Answer B is incorrect because you should call the destructor only when you need to release unmanaged resources. Answer D is incorrect because setting the SqlConnection object to null does not actually close the connection, but the object does continue to exist in memory waiting for garbage collection.

Question 23

The correct answer is C. A DataRelation object is used to relate two DataTable objects to each other. After you create a DataRelation object, you can call the GetChildRows() and GetParentRows() methods of the DataRow object to fetch child rows or parent rows, respectively. Answers A and B are incorrect because just by defining primary keys or foreign keys on the table does not relate the tables. Answer D is incorrect because the DataSet.Merge() method is used to merge two DataSet objects, which is not a requirement in this case.

Question 24

The correct answer is B. The XmlValidatingReader object enables you to validate an XML document. You use its ValidationEventHandler event to set an event handler for receiving information about the schema validation errors. Answer A is incorrect because the XmlDocument object cannot validate the XML document on its own. Answer C is incorrect because the EnforceConstraints property of DataSet is used to specify whether the database constraint rules are followed when attempting any update operation. Answer D is incorrect because the DataSet.MergeFailed event occurs only when a target and source DataRow have the same primary key value and EnforceConstraints is set to true .

Question 25

The correct answer is B. The LIKE clause determines whether a given character string matches a specified pattern. You use the % character as the wildcard character. Answer A is incorrect because you must use the LIKE clause instead of the IN clause for pattern searching. Answers C and D are incorrect because you need to use % as the wildcard character for matching instead of the * character.

Question 26

The correct answer is D. OleDbDataReader enables you to read the data one row at a time in a forward-only fashion; therefore, it occupies less memory and improves the performance of your application. The question requires you to read the data in a sequential fashion and write it to the flat file, so the OleDbDataReader object is the best option. Answer A is incorrect because a DataSet object loads the entire retrieved data in the memory. Answer B is incorrect because you cannot retrieve the data directly in a DataTable object. Answer C is incorrect because the SqlDataReader object is optimized to work with SQL Server 7.0 and later versions.

Question 27

The correct answer is D. Because other operations on the database, such as add and update, are working fine, the DeleteCommand property might not be set. The DeleteCommand property should be set to a command that deletes rows from the database. Answers A and C are incorrect because in these cases, none of the changes would be saved. Answer B is incorrect because, if the DeleteCommand property is correctly set, the Update() method deletes rows.

Question 28

The correct answer is C. The Read() method returns the number of bytes read, so answers B and D fail when there is 1 byte in the file. The Read() method reads to a byte array, so answers A and B fail because the buffer is the incorrect data type.

Question 29

The correct answer is A. While creating a SqlParameter object, you specify SQL Server data types using the SqlDbType enumeration rather than specify the .NET Framework data types. The @SalesID parameter is defined as an output parameter in the stored procedure; therefore, the Direction property of the SqlParameter object should be set to Output . Answers B and D are incorrect because the Direction property is set to ReturnValue , which specifies that the parameter represents a return value from a stored procedure. Answers C and D are incorrect because you should specify SQL Server data types when creating a SqlParameter object.

Question 30

The correct answer is A. You must explicitly call the DataBind method of the page or of the particular control to bind the data. Answer B is incorrect because you can display data in a ListBox even without setting any value for the DataValueField property. Answer C is incorrect because a ListBox control can be bound to an ICollection interface. Answer D is incorrect because you should write data-binding code in the Page_Load() event handler rather than Page_Init() .

Question 31

The correct answer is C. The controls in the HeaderTemplate template are rendered once at the start of the Repeater control. Answer A is incorrect because the controls in the ItemTemplate are rendered once for every row of data in the data source of the control. Answer B is incorrect because the controls in the AlternatingItemTemplate are rendered once for every other row instead of the ItemTemplate . Answer D is incorrect because the SeparatorTemplate is rendered once between each row of data in the data source of the control.

Question 32

The correct answer is C. You should use type-casting to display data because the type-casts are evaluated at compile time and therefore do not cause performance penalty as in the case of the DataBinder.Eval() method. To display the month and day, you need to format the date. Answers A and B are incorrect because the DataBinder.Eval() method uses reflection to parse and evaluate a data-binding expression against an object at runtime, which causes a performance penalty. Answer D is incorrect because it does not format the date returned from the database in the desired format.

Question 33

The correct answers are A and D. In this scenario, the XmlReadMode.Auto and XmlReadMode.InferSchema options infer schema from the data. Answer B is incorrect because the data in the Orders.xml file is not a DiffGram. Answer C is incorrect because, when XmlReadMode is set to Fragment , the default namespace is read as the inline schema. Answer E is incorrect because the XML file does not include a schema.

Question 34

The correct answer is D. Adding the WebMethod attribute to a public method makes it callable from remote Web clients . Answer A is incorrect because methods can be part of the public interface of a Web service. Answer B is incorrect because the WebService attribute is applied to the Web service class and not Web methods. Answer C is incorrect because Web service methods can return any data type.

Question 35

The correct answer is A. The CurrentCulture property specifies which culture to use for formatting dates, numbers , currencies, and so on. Answer B is incorrect because allowing the user to choose a culture is better than accepting the value of the UserLanguages string. The UserLanguages property of the HttpRequest object is not a reliable indicator of the end user's preferred language because Web browsers are not required to set this property. Answers C and D are incorrect because the CurrentUICulture property only specifies the culture to use when choosing resources for the user interface.

Question 36

The correct answer is A. Only the CompareInfo object can correctly handle the search in all character sets, including those that use multiple bytes per character. Answer B is incorrect because Array.Sort() does not locate substrings. Answers C and D are incorrect because the String.IndexOf() and String.IndexOfAny() methods can find substrings but are not culture aware.

Question 37

The correct answer is A. Because only one application is using the COM component, the quickest way to create the Runtime Callable Wrapper (RCW) and have the COM component available in your Visual C# .NET project is to use the Add Reference dialog box to add a direct reference to the COM component. Answers B and C are incorrect because the COM component is not shared by multiple applications and you therefore need not use the Type Library Importer tool to generate RCW for the COM component. Answer D is incorrect because the PInvoke feature is used to call functions from unmanaged libraries, such as Win 32 API libraries, rather than the COM component libraries.

Question 38

The correct answer is C. For compatibility with the largest number of accessibility aids, you should use bold or underlining to highlight information. Answer A is incorrect because you shouldn't depend on only color to convey information in an accessible application. Answers B and D are incorrect because they are not accessible ways to highlight information and are not compatible with most of the accessibility aids and Web browsers.

Question 39

The correct answer is D. If you get a DCOM configuration error while debugging, you might not be a member of the Debugger Users group on the remote machine. To resolve this, you must add your account on the remote machine to the Debugger Users group. Answer A is not correct because all users on a local computer are already part of the Users group. Answer B is incorrect because adding an account to the Users group on the remote machine does not allow you to debug a program remotely using Visual Studio .NET. For that, you must be a member of the Debugger Users group. Answer C is incorrect because you need to debug a program remotely, so you should be a member of the Debugger Users group on the remote computer rather than the local computer.

Question 40

The correct answer is B. The Assert() method checks for the given condition and generates an error when the condition evaluates to false . Answer A is incorrect because this code segment generates an error only when the value of TotalShipments is not equal to 0. Answers C and D are incorrect because the Debug.Assert() method is invoked only when the program is complied using the Debug configuration.

Question 41

The correct answer is D. The TraceSwitch class provides a multilevel switch to control tracing output without recompiling your code. Answer A is incorrect because the /d:TRACE option enables the tracing but does not allow multilevel control over tracing output. Answer B is incorrect because modifying environmental variables requires much more administrative effort when compared to a configuration file. Answer C is incorrect because this option requires the program to be recompiled each time the value of TRACE is modified.

Question 42

The correct answer is B. For booleanSwitch , a value of corresponds to Off and any nonzero value corresponds to On . For TraceSwitch , any number greater than 4 is treated as Verbose . From the given values in the configuration file, the booleanSwitch object will have its Enabled property set to true and the traceSwitch object will have its Level property set to TraceLevel.Verbose . Answers A, C, and D are incorrect because the booleanSwitch.Enabled property is set to false instead of true .

Question 43

The correct answer is C. The Trace class is enabled in the default Release configuration as well as the default Debug configuration. Answers A, B, and D are incorrect because the TRACE symbol is defined in both the default Debug and the default Release configurations but the DEBUG symbol is defined only in the default Debug configuration.

Question 44

The correct answer is D. To enable tracing for all the pages of the Web application, you should enable tracing in the application configuration file ( web.config ). To view the tracing information in the Web page, you should set the pageOuput attribute to true . To store tracing information for more requests, you should set the requestLimit attribute to a larger number. Finally, to access the tracing information from the trace viewer in the tester's desktop, the localOnly attribute should be set to false . Answers A and B are incorrect because the tester wants to view tracing information for a larger number of requests. Answers C and F are incorrect because they disable tracing for the entire Web application. Answer E is incorrect because the localOnly attribute is set to true . The localOnly attribute indicates whether the tracing information should be available only in the hosting Web server or in all the clients (local as well as remote).

Question 45

The correct answers are A, B, and E. Because multiple applications are using this assembly, you need to install the assembly in the GAC. To install the assembly in the GAC, you need to sign the assembly with a strong name before deploying it to the GAC. Finally, to enable COM applications to use the assembly, you must register the assembly in the Windows Registry. Answer C is incorrect because the COM applications don't need to be compiled. Answer D is incorrect because you do not need to use a COM DLL in a .NET application. Answers F and G are incorrect because shared assemblies should be deployed in the GAC. When an assembly is registered in the Windows Registry, COM applications can locate shared assemblies from the GAC.

Question 46

The correct answers are C and D. Because the Warehousing application is the only application using the component, you should copy the component to the Warehousing application. You can now create a Web Setup project to deploy the application and component. Answers A and B are incorrect because the Merge Module projects are useful only for creating reusable setup components .

Question 47

The correct answers are A and E. If you want multiple applications to use an assembly, you need to sign the assembly with a strong name and place the assembly in the GAC. Answer B is incorrect because no COM applications are using the assembly. Answers C and D are incorrect because assemblies cannot be deployed in the GAC with XCOPY or FTP.

Question 48

The correct answer is C. You must install the ASP.NET software on the Web server before accessing ASPX pages. If ASP.NET is not installed, the pages are rendered by IIS as HTML pages and the Web server controls are not displayed. Answer A is incorrect because Web server controls do not require registration in the Windows Registry and can be deployed using the FTP command. Answer B is incorrect because the Web server controls can easily coexist with static HTML. Answer D is incorrect because even the most basic Web browsers can render ASP.NET pages successfully.

Question 49

The correct answers are C and D. By optimizing the compression of the Web Setup project for speed, the setup program compresses the assemblies using a compression algorithm optimized for speed. The result is a lower compression ratio and a setup package that is larger in size but that executes faster. Answers A and B are incorrect because modifying the Web setup project's properties does not affect the size or speed of the installed assemblies.

Question 50

The correct answer is A. When you want to check whether a particular user belongs to a particular role or whether the user has a particular privilege, you need to perform role-based security. Answer B is incorrect because the application requires access to the BalanceSheet object for specific users. Answer C is incorrect because encryption makes the data more difficult to read but does not restrict the code from performing certain operations. Answer D is incorrect because type safety allows code to access only the primary memory locations that it is authorized to access. Type safety has no control over application-specific operations.

Question 51

The correct answer is D. You must tell the Common Language Runtime (CLR) how users are authenticated, even when you are using a Windows application that automatically employs Windows authentication. Answers A, B, and C are incorrect because they do not specify the authentication mode.

Question 52

The correct answers are B and D. You should configure IIS to disable anonymous access to keep anonymous employees from accessing the system. You can use any of the Windows authentication methods for authenticating employees . You can also disallow unauthenticated access in the application by using the <deny> element. Answer A is incorrect because it allows access to all users. Answer C is incorrect because you can use any of the Windows authentication methods to implement Windows authentication in your Web application.

Question 53

The correct answer is A. By default, ASP.NET runs under a low privilege account, the ASPNET account. If impersonation is not enabled, all requests are made by ASP.NET using the ASPNET account. Answer B is incorrect because, by default, ASP.NET does not run under the SYSTEM account, which is a high privilege account. Answers C and D are incorrect because impersonation is not enabled with these accounts.

Question 54

The correct answers are A and D. The perm2 object is a union of all three PrincipalPermission objects ( pp1 , pp2 , and pp3 ). The perm1 object is the union of two PrincipalPermission objects ( pp1 and pp2 ). As a result, perm1 is a subset of perm2 , but not vice versa. Answer B is incorrect because perm1 is a subset of perm2 . Answer C is incorrect because perm2 is not a subset of perm1 .

Question 55

The correct answer is D. To manage the load of your Web application and make the application accessible, you should select Web farm configuration to deploy your application. Web farm configurations make your applications scalable and reliable because they enable you to run multiple Web servers to process the application requests. Therefore, the load is balanced and failure of one server does not affect other servers processing the requests. Answer A is incorrect because the existing deployment is single-server and cannot balance the load of the application or manage a hardware failure in the Web server. Answer B is incorrect because, although Web garden deployment can balance the load of your application by running the application in a multiple-processor computer, it cannot provide a solution in case of server failure. Answer C is incorrect because cluster deployment can make the application more reliable but cannot help in making an application scalable.

Question 56

The correct answer is B. Web user controls can only be shared by copying their files into each application where you want to use them. Answers A and D are incorrect because user controls cannot be precompiled into an assembly and cannot be shared by multiple applications by placing the assembly in the GAC. Answer C is incorrect because the user control files should be included in each application project where they are needed.

Question 57

The correct answer is D. Controls that assist in design view and with no runtime user interface should derive from the Component class. Answers A, B, and C are incorrect because controls derived from the Control , WebControl , and Label classes provide a runtime user interface and therefore are unsuitable for the given requirement.

Question 58

The correct answer is D. Using a class derived from EventArgs to pass event parameters is preferable to using individual arguments because it's more readily extended in case you need to pass additional parameters in the future. Answers A and C are incorrect because event-related data should be passed as an argument to the event handler. Answer B is incorrect because, by convention, event handlers accept only two arguments ”the object that received the event and the object containing the event argument. However, according to good programming practices, classes containing event data should derive from the EventArgs class and should have names ending with the suffix EventArgs .

Question 59

The correct answer is D. The LoadControl method of the Page class is used to load a user control programmatically from an .ascx file. Because you want to set the user control properties programmatically, you need to typecast the control to the user control. Answers A and B are incorrect because you cannot create a user control with the constructor of the Control class. Answer C is incorrect because it does not add the user control to the ControlCollection of the parent control.

Question 60

The correct answer is D. When a custom control does not require a runtime user interface, the Component class provides the lowest overhead. Answers A, B, and C are incorrect because they are suitable for designing controls with a user interface.



MCAD Developing and Implementing Web Applications with Visual C#. NET and Visual Studio. NET (Exam [... ]am 2)
MCAD Developing and Implementing Web Applications with Visual C#. NET and Visual Studio. NET (Exam [... ]am 2)
ISBN: 789729016
EAN: N/A
Year: 2005
Pages: 191

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net