Quiznetik

ASP.NET | Set 1

1. Which file you should write for the connection string so that you can access it in all the web pages for the same application?

Correct : B. In Web.config file

2. You need to allow users to choose their own themes. In which page event will you write the user-selected theme?

Correct : C. Page_PreInit

3. Which is the first event of the ASP.NET page, when the user requests a web page?

Correct : C. PreInit

4. What is the name of the Page object’s property that determines if a Web page is being requested without data being submitted to the server?

Correct : D. IsPostBack

5. How will you specify the Cache Location?

Correct : B. You can use the Location attribute of the <%@ OutputCache %> directive to specify where a page is cached.

6. Which of the following is not a member of ADODBCommand object?

Correct : C. Open

7. __________________ is a special subfolder within the windows folder that stores the shared .NET component.

Correct : B. GAC

8. Which file contains settings for all .NET application types, such as Windows, Console, ClassLibrary, and Web applications?

Correct : B. Machine.config

9. Which programming model should you implement if you want to separate your server-side code from your client-side layout code in a Web page?

Correct : B. Code-behind model

10. You want to make a configuration setting change that will affect only the current Web application. Which file will you change?

Correct : B. Web.config in the root of the Web application

11. Which of the following is not an ASP.NET page event?

Correct : C. Import

12. To implement a specified .NET Framework interface which directive is used?

Correct : D. @Implements

13. In ASP.NET application DLL files are stored in which folder?

Correct : C. Bin

14. To create your application on a remote server which option you will choose in ASP.NET?

Correct : B. FTP

15. Which one of the following HTTP verbs indicates that you are creating and writing a file on the Web server?

Correct : D. PUT

16. What is the name of the Page object’s property that determines if a Web page is being requested without data being submitted to server?

Correct : D. IsPostBack

17. If a user wants to create controls at runtime which event should be used to write code?

Correct : D. PreInit

18. What is the fully qualified name of the base class of all server controls?

Correct : A. System.Web.UI.Control

19. Which of the following are required to enable users to change the title of web part?

Correct : C. EditorZone, AppearanceEditorPart

20. What is Caspol?

Correct : D. Command line tool & Code access security policy tool

21. What are the element of code access security?

Correct : A. Evidence,Permission

22. What is the recommended method for securing sensitive connection string information?

Correct : C. Using Integrated Security (Windows Authentication)

23. Windows-Based Authentication is well suited for ___________ .

Correct : A. Intranet environment

24. Which of the following control provides a link for unauthenticated users to log on?

Correct : C. LoginStatus

25. Where do we include the user lists for Form authentication?

Correct : A. < credential>

26. How to implement authentication via web.config?

Correct : B. Include the authorization element.

27. You use the ASP.NET Web Site Administration Tool to configure ASP.NET membership with forms authentication. What should you name your login form so that you do not have to modify the Web.config file?

Correct : A. Login.aspx

28. Which of the following is the default authentication mode for IIS?

Correct : A. Anonymous

29. You need to programmatically configure page output caching. Which object would you use?

Correct : B. Response

30. Which of these data source controls do not implement Caching?

Correct : A. LinqDataSource

31. Which object data is included in bookmarks and e-mailed URLs?

Correct : C. Query strings

32. Which Session Mode Serialization is not required to store the data?

Correct : B. InProc

33. Which object in ASP.NET provides a global storage mechanism for state data that needs to be accessible to all pages in a given Web application?

Correct : B. Application

34. Which file is used to write the code to respond to the Application_Start event?

Correct : C. Global.asax

35. When a User’s Session times out which event should you respond to?

Correct : B. Session_End

36. Which Session Mode stores session Information in Current Application Domain?

Correct : A. InProc

37. What are the client-side state management options that ASP.NET supports?

Correct : C. Querystring

38. What type of data can Cookies store?

Correct : A. String

39. From the following which is not a valid state management object?

Correct : A. Querystate

40. To kill a users session explicitly which of the following will you use?

Correct : C. Session.Abondon()

41. What ASP.NET object encapsulates the state of the client and the browser?

Correct : B. Session Object

42. Default Session data is stored in ASP.Net.

Correct : B. Session Object

43. If you are using the DataSet and you have to display the data in sorted order what will you do?

Correct : C. Use DataViev object with each sort

44. How do you determine the actual SQL data type of a SqlParameter (the type expected by the SQL Server)?

Correct : B. It is the type of column or data in SQL Server that the command expects.

45. What are the three primary kinds of parameters?

Correct : D. Input, Output, InputOutput

46. Which SqlCommand execution returns the number of effected records in the table?

Correct : A. ExecuteNonQuery

47. Which CommandType value is incorrect?

Correct : C. TableSchema

48. Which data provider gives the maximum performance from a connection to SQL Server?

Correct : C. The SqlClient data provider.

49. In a SQL Statement while working with SqlCommand it returns a single value, at that time which method of Command Object will be used?

Correct : C. ExecuteScalar

50. You want to secure the connection strings contained within your Web.config file to ensure that no one can open the file easily and see the connection information. Which tool must you use to encrypt the connection strings?

Correct : C. ASPNET_REGIIS.EXE

51. Which ADO.NET class provide Connected Environment?

Correct : A. DataReader

52. On what object would you set the properties to create a primary key for a DataTable?

Correct : C. DataSet