Q. Which statement among the ones below is correct

A.The Params and Forms collection of the HTTPRequest class are exactly same and theForms collection has       been provided only for backward  compatibility
B.The HTTPRequest class does include the Params collection
C.The HTTPRequest class does include the Forms collection
D.The difference between the Params and Forms collection of the HTTPRequest class is that the Params collection also represents QueryStrings, ServerVariables, andCookies
Ans:D

Q. In a ASP.NET page, which is the best way to find if the contents of a TextBox has changed after the form containing the TextBox has been posted back to the server

A.By comparing the old value with the new value
B.By checking the NewValue property of the TextBox control
C.By handling the TextBox control's TextChanged event
D.By checking the HasChanged property of the TextBox
Ans:C

Q. Which property allows ASP.NET controls to maintain their values when a page is posted to itself.

A.EnableViewState
B.MaintainValue
C.SaveValue
D.AutoPostBack
Ans:A

Q. What is the default value for the Method attribute in a ASP.NET server-side Form control

A. GET
B. POST
C. SOAP
D. SMTP
Ans:B

Q. _____ is the Microsoft IIS server running, handling ASP.NET requests among other things

A. aspnet_isapi.dll
B.aspnet_wp.exe
C.inetinfo.exe
D.None
Ans: C

Q. When you have a complex control, like DataGrid, writing an event processing routine for each object (cell, button, row, etc.) is quite tedious. The controls can ______ their eventhandlers, allowing the main DataGrid event handler to take care of its constituents.

A. invoke event
B.raise event
C. bubble event
D.instantiate event
Ans:C

Q. You need to store state data that is accessible to any user who connects to your Web application. Which object should you use?

A. Session
B. Application
C. Response.Cookies
D. Response.ViewState
Ans: B

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


 A. Application Object
 B. Session Object
 C. Response Object
 D. Request Object
Ans: B

Q. You are developing a web application that is retrieving historical library information from database server and displays it to the users of your application. What cache strategy will give you the best performance?

 A. Use the output cache
 B. Use a cache object
 C. Use the ASP.NET central cache
 D. Use the client cache
Ans: B

Q. Cache["dd"]="asp.net"; What is the timeperiod of this Cache object?

 A. Infinite
 B. 0 seconds
 C. None of these
Ans:B

Q. Session_End fires in which of these SessionState modes?

 A. Inproc
 B. StateServer
 C. SQLServer
 D. None
Ans:A

Q. While writing code in Visual Studio 2005 you creates a new instance of a ASP.NET TextBox server control, what do you need to do to get the TextBox to display on the Web page?


 A. Call the ShowControl method on the TextBox.
 B. Set the VisibleControl to true on the TextBox.
 C. Add the TextBox instance to the form1.Controls collection.
 D. Execute the AddControl method on the Web page.
Ans:C.

Q. In the Design view in Visual Studio 2005 of an ASP.NET web page, what is the easiest way to create an event handler for the default event of a ASP.NET server control?


 A. Open the code-behind page and write the code.
 B. Right-click the control and select Create Handler.
 C. Drag an event handler from the ToolBox to the desired control.
 D. Double-click the control.
Ans: D

Q. How to implement authentication via web.config?


 A. Include the authentication element.
 B. Include the authorization element.
 C. Include the identity element.
 D. Include the deny element.
Ans: B.

Q. While developing ASP.NET 2.0 web application you want to display a list of parts in a master/detail scenario where the user can select a part number using a list that takes a minimum amount of space on the Web page. When the part is selected, a DetailsView control displays all the information about the part and allows the user to edit the part. Which Web control is the best choice to display the part number list for this scenario?


 A. The DropDownList control
 B.The RadioButtonList control
 C.The FormView control
 D.The TextBox control
Ans: A

Q.While developing ASP.NET 2.0 web application you have a DataSet containing a Customer DataTable and an Order DataTable. You want to easily navigate from an Order DataRow to the Customer who placed the order. What object will allow you to easily navigate from the Order to the Customer?


 A. The DataColumn object
 B. The DataTable object
 C. The DataRow object
 D. The DataRelation object
Ans: D

Q. In your ASP.NET web application you want to display a list of clients on a Web page. The client list displays 10 clients at a time, and you require the ability to edit the clients. Which Web control is the best choice for this scenario?


 A. The DetailsView control
 B.The Table control
 C.The GridView control
 D.The FormView control
Ans: C

Q. You are writing ASP.NET 2.0 Web site that collects lots of data from users, and the data collection forms spreads over multiple ASP.NET Web pages. When the user reaches the last page, you need to gather all of data, validate the data, and save the data to the SQL Server database. You have noticed that it can be rather difficult to gather the data that is spread over multiple pages and you want to simplify this application. What is the easiest control to implement that can be used to collect the data on a single Web page?


 A. The View control
 B.The TextBox control
 C.The Wizard control
 D.The DataCollection control
Ans: C

Q. To perform asynchronous data access, what must be added to the connection string?


 A. BeginExecute=true
 B.MultiThreaded=true
 C.MultipleActiveResultSets=true
 D.Asynchronous=true
Ans: D

Q. For separating server-side code from client-side code on a ASP.NET page, what programming model should you use?


 A. Separation model
 B.Code-Behind model
 C.In-Line model
 D.ClientServer model
Ans: B

Q. What is the name of the property of ASP.NET page that you can query to determine that a ASP.NET page is being requested not data being submitted to web server?


 A.FirstGet
 B.Initialized
 C.IncludesData
 D.IsPostBack
Ans: D

Q. In which event are the controls fully loaded?


 A. Page_Init
 B.Page_Load
 C.Control events
 D.Page_Unload events
Ans: B

Q. What is the best way to store the connection strings?


A. Config files
B.Database text file
C. session
Ans:  A

Q. By default, a .Net web site is configured with which of the following authentication types?


A. Anonymous
B.Basic
C.Digest
D.Integrated Windows authentication
Ans: A and D

Q. ____________ is the Microsoft IIS server running, handling ASP.NET requests among other things


A. aspnet_isapi.dll
B. aspnet_wp.exe
C. inetinfo.exe
Ans: C

Q. ________ is the DataType return in IsPostback property.


A. boolean
B. int
C. object
D. string
Ans: A

Q. Which one of the following is to be implemented for .NET remote server object?


A.ISerializable
B.ISingleCall
C. IUnknown
D.IMarshalByValue
Ans: A

Q. ________ method(s) are used with Application object to ensure only one process accesses a variable at a time.


A. Synchronize
B. ThreadLock
C. Sychronize()
D. Lock() and UnLock()
Ans: D

Q. Which one of the following is the type of assembly that contains localized resources?


A. Satellite
B. Shared
C. Hub
D. localized
Ans: A

Q. Which of the following object encapsulates the state of the client and the browser?


A. Server object
B. Request object
C. Response object
D. Session object
Ans: D

Q. When does Garbage collector run?

A. When application is running low of memory
B.  It runs random
C.  When application is running for more than 15 minutes
D.  None of the above
Ans: A

Q. Which one of the following is the fastest way to concat strings in ASP.NET?


A. Concat method of the String object
B. Append method of the StringBuilder object
C. Plus sign operator to concatenate the strings
D. Substring method of the String object
Ans: B

Q. What namespace does the Web page belong in the .NET Framework class hierarchy?


A. System.Web.Control
B. System.Web.RootBuilder
C. System.Web.UserControl
D. System.Web.UI.Page
Ans: D

Q. ______is the first method that is fired during the page load.


A. PreRender()
B. Load()
C. Unload()
D. Init()
Ans: D

Q. Which one of the following is used to obtain performance information about a Web Application?


A. Performance Counters
B. Data Performance Counters
C. Web Performance Counters
D. Data Readers
Ans: A

Q. _____is a property common in every validation control.


A. ValidationExpression
B. InitialValue
C. ValueToCompare
D. ControlToCompare
E. ControlToValidate
Ans: E

Q. Which of the following base class do all Web Forms inherit from?


A. Window class
B. Web class
C. Form class
D. Page class
 Ans: D

Q. Which one of the following is the last stage of the Web forms lifecycle?


A. Page_Load
B. Event Handling
C. Page_Init
D. Validate
E. Page_Unload
Ans: E

Q. By default, ASP.NET store SessionIDs in _________


A. Cookies
B. Cache
C. Database
D. Global variable
Ans: A

Q. Which of the following is used to cache multiple responses for a single web form based on HTTP POST parameter or query string?


A. VaryByParams
B. VaryByHeaders
C. SetCacheability
D. SetVaryByCustom
Ans: A

______ tests make sure that new code does not break existing code?


A. Regression tests
B. Integration tests
C. Unit tests
D. Load test
Ans: B

Q. By default, code written with the Debug class is stripped out of release builds.


A. Yes
B. No
Ans: A

Q. What attributes do you use to hide a public .Net class from COM?


A. DLLImport Attributes
B. ComVisible attributes
C. COM Interop
D. All
Ans: B

Q. Which of the following authentication is best suited for a corporate network?


A. Windows
B. Form
C. User
 D. All
Ans: A

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


A. < credential>
B. < authorization>
C. < Identity>
D. < authentication>
Ans: A

Q. Where do we include the user lists for windows authentication?


A. < Credential>
B. < authorization>
C. < identity>
D. < authentiation>
Ans: B

Q. The _____ property affects how the .Net Framework handles dates, currencies, sorting and formatting issues.


A. CurrentUICulture
B. CurrentCulture
Ans: B

Q. Which of the following is the way to monitor the web application?


A. MMC Event viewers
B. Performance logs
C. Alerts Snap-ins
D. ALL
Ans: D

Q. Which of the following is faster and consume lesser memory?


A. SQLDataReader
B. Data Set
Ans: A

Q. Which of the following is the performance attributes of processModel?


A. requestQueue limit
B. maxWorkerThreads
C. maxIdThreads
D. All
Ans: D

Q. _______ is a special subfolder within the windows folder that stores the shared .NET component?


A. /bin
B. GAC
C. Root
Ans: B

Q. ______element in the web.config file to run code using the permissions of a specific user?


A. < credential> element
B. < authentication> element
C. < authorization> element
D. < identity> element
Ans: D

Q. You can have only one Global.asax file per project?


A. Yes
B. No
Ans: A

Q. Which of the following is not the way to maintain state?


A. View state
B. Cookies
C. Hidden fields
D. Request object
Ans: D

Q. Mode of storing ASP.NET session?


A. InProc
B. StateServer
C. SQL Server
D. All of the above
Ans: D

Q. Which of the following control is used to validate that two fields are equal?


A. RegularExpressionValidator
B. CompareValidator
C. equals() method
D. RequiredFieldValidator
Ans: B

Q. Which of the following object is used along with application object in order to ensure that only one process accesses a variable at a time?


A. Synchronize
B. Synchronize()
C. ThreadLock
D. Lock()
Ans: B

Q. Which of the following ASP.NET object encapsulates the state of the client?


A. Session object
B. Application object
C. Response object
D. Server object
Ans: A

Q. Which object can help you maintain data across users?


A. Application object
B. Session object
C. Response object
D. Server object
Ans: A

Q. How do you get information from a form that is submitted using the "post" method?


A. Request.QueryString
B. Request.Form
C. Response.write
D. Response.writeln
Ans: B

Q. Default scripting language in ASP?


A. EcmaScript
B. VBScript
C. PERL
D.JavaScript
Ans: B

Q. Default Session data is stored in ASP.Net?


A. StateServer
B. Session Object
C. InProcess
D. all of the above
Ans: C

Q. Which DLL translate XML to SQL in IIS?


A. SQLISAPI.dll
B. SQLXML.dll
C. LISXML.dll
D. SQLIIS.dll
Ans: A

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


A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Ans: C

Q. Why is Global.asax is used?


A. Declare Global variables
B. Implement application and session level events
C. No use
Ans:B

Q. An alternative way of displaying text on web page using


A. asp:label
B. asp:listitem
C. asp:button
Ans:A

Q. File extension used for ASP.NET files.


A. .Web
B. .ASP
C. .ASPX
D. None of the above
Ans:B

Q. What is used to validate complex string patterns like an e-mail address?

A. Extended expressions
B. Basic expressions
C. Regular expressions
D. Irregular expressions
Ans: C

Q. Caching type supported by ASP.Net

A. Output Caching
B. DataCaching
C. A and B
D. none of the above
Ans: C

Q. Attribute must be set on a validator control for the validation to work.

A. ControlToValidate
B. ControlToBind
C. ValidateControl
D. Validate
Ans: A

Q. We can manage states in asp.net application using

A. Session Objects
B. Application Objects
C. Viewstate
D. All of the above
Ans: D

Q. What class does the ASP.NET Web Form class inherit from by default?

A. System.Web.UI.Page
B. System.Web.UI.Form
C. System.Web.GUI.Page
D. System.Web.Form
Ans: A

Q. Which of the following tool is used to manage the GAC?

A. RegSvr.exe
B. GacUtil.exe
C. GacSvr32.exe
D. GacMgr.exe
Ans: B

Q. How do we create a FileSystemObject?

A. Server.CreateObject("Scripting.FileSystemObject")
B. Create("FileSystemObject")
C. Create Object:"Scripting.FileSystemObject"
D. Server.CreateObject("FileSystemObject")
Ans:A

Q. Which of the following method must be overridden in a custom control?

A. The Paint() method
B. The Control_Build() method
C. The default constructor
 D.The Render() method
Ans: D

Difference between Response.Write() andResponse.Output.Write().

A. Response.Output.Write() allows you to buffer output
B. Response.Output.Write() allows you to write formatted output
C. Response.Output.Write() allows you to flush output
D. Response.Output.Write() allows you to stream output
Ans: B

Q. The first event triggers in an aspx page is.

A. Page_Init()
B. Page_Load()
C. Page_click()
Ans: A

Q. Which of the following object is not an ASP component?

A. LinkCounter
B. Counter
C. AdRotator
D. File Access
Ans: A

Q. Web.config file is used___

A. Configures the time that the server-side codebehind module is called
B. To store the global information and variable definitions for the application
C. To configure the web server
D. To configure the web browser
Ans: B

Choose the form in which Postback occur?

 A. HTMLForms
 B. Webforms
 C.Winforms
Ans: B

ASP.Net Multiple Choice Questions and Answers for freshers and Experienced

1.  Choose the form in which Postback occur
2.  Web.config file is used...
3.  Which of the following object is not an ASP component?
4.  The first event triggers in an aspx page is.
5.  Difference between Response.Write() andResponse.Output.Write().
6.  Which of the following method must be overridden in a custom control?
7.  How do we create a FileSystemObject?
8.  Which of the following tool is used to manage the GAC?
9.  What class does the ASP.NET Web Form class inherit from by default?
10. We can manage states in asp.net application using
11. Attribute must be set on a validator control for the validation to work.
12. Caching type supported by ASP.Net
13. What is used to validate complex string patterns like an e-mail address?
14. File extension used for ASP.NET files.
15. An alternative way of displaying text on web page using
16. Why is Global.asax is used?
17. Which of the following is not a member of ADODBCommand object?
18. Which DLL translate XML to SQL in IIS?
19. Default Session data is stored in ASP.Net.
20. Default scripting language in ASP.
21. How do you get information from a form that is submitted using the "post" method?
22. Which object can help you maintain data across users?
23. Which of the following ASP.NET object encapsulates the state of the client?
24. Which of the following object is used along with application object in order to ensure that only one process accesses a variable at a time?
25. Which of the following control is used to validate that two fields are equal?
26. Mode of storing ASP.NET session
27. Which of the following is not the way to maintain state?
28. You can have only one Global.asax file per project.
29. ___________ element in the web.config file to run code using the permissions of a specific user
30. __________ is a special subfolder within the windows folder that stores the shared .NET component.
31. Which of the following is the performance attributes of processModel?
32. Which of the following is faster and consume lesser memory?
33. Which of the following is the way to monitor the web application?
34. The ___________ property affects how the .Net Framework handles dates, currencies, sorting and formatting issues.
35. Where do we include the user lists for windows authentication?
36. Where do we include the user lists for Form authentication?
37. Which of the following authentication is best suited for a corporate network?
38. What attributes do you use to hide a public .Net class from COM?
39. By default, code written with the Debug class is stripped out of release builds.
40. __________ tests make sure that new code does not break existing code.
41.  The .NET Framework provides a runtime environment called..... ?
42.  In ASP.NET in form page the object which contains the user name is ______ ?
43.  Find the term: The .NET framework which provides automatic memory management using a technique called __________ ?
44.  Which of the following denote ways to manage state in an ASP.Net Application?
45.  What is the base class from which all Web forms inherit?
46.  WSDL stands for ___________ ?
47.  Which of the following must be done in order to connect data from some data resource to Repeater control?
48.  Which of the following is FALSE?
49.  Which of the following transfer execution directly to another page?
50.  If one has two different web form controls in a application and if one wanted to know whether the values in the above two different web form control match what control must be used?
51.  Which of the following is used to send email message from my ASP.NET page?
52.  In my .NET Framework I have threads. Which of the following denote the possible priority level for the threads?
53.  In .NET the operation of reading metadata and using its contents is known as ______?
54.  In ASP.NET the < authorization > section contain which of the following elements?
55.  The type of code found in Code-Behind class is ________ ?
56.  Common type system is built into which of the following:
57.  The actual work process of ASP.NET is taken care by _____________?
58.  Which of the following allow writing formatted output?
59.  Which of the following denote the property in every validation control?
60.  How many classes can a single .NET DLL contain?
61.  Suppose one wants to modify a SOAP message in a SOAP extension then how this can be achieved. Choose the correct option from below:
62.  Which of the following can be used to add alternating color scheme in a Repeater control?
63.  Suppose a .NET programmer wants to convert an object into a stream of bytes then the process is called ______________ ?
64.  The technique that allow code to make function calls to .NET applications on other processes and on other machines is
65.  The namespace within the Microsoft .NET framework which provides the functionality to implement transaction processing is_______.
66.  Which of the following method is used to obtain details about information types of assembly?
67.  Which of the following is TRUE about Windows Authentication in ASP.NET?
68.  What tags one need to add within the asp:datagrid tags to bind columns manually?
69.  Which method do you invoke on the DataAdapter control to load your generated dataset with data?
70.  In ASP.NET the sessions can be dumped by using
71.  Which of the following languages can be used to write server side scripting in ASP.NET?
72.  When an .aspx page is requested from the web server, the out put will be rendered to browser in following format.
73.  The Asp.net server control, which provides an alternative way of displaying text on web page, is
74.  The first event to be triggered in an aspx page is.
75.  Postback occurs in which of the following forms.
76.  What namespace does the Web page belong in the .NET Framework class hierarchy?
77.  Which method do you invoke on the Data Adapter control to load your generated dataset?
78.  How do you register a user control?
79.  Which of the following is true?
80.  To add a custom control to a Web form we have to register with.
81.  Custom Controls are derived from which of the classes
82.  How ASP.Net Different from classic ASP?
83.  What's the difference between Response.Write() andResponse.Output.Write()?
84.  Why is Global.asax is used?
85.  There can be more than 1 machine.config file in a system
86.  What is the extension of a web user control file?
87.  Which of the following is true?
88.  The number of forms that can be added to a aspx page is.
89.  How do you manage states in asp.net application
90.  Which property of the session object is used to set the local identifier?
91.  Select the caching type supported by ASP.Net
92.  Where is the default Session data is stored in ASP.Net?
93.  Select the type Processing model that asp.net simulate
94.  Does the EnableViewState allows the page to save the users input on a form?
95.  Which DLL translate XML to SQL in IIS?
96.  What is the maximum number of cookies that can be allowed to a web site?
97.  Select the control which does not have any visible interface.
98.  How do you explicitly kill a user session?
99.  Which of the following is not a member of ADODBCommand object?
100. Which one of the following namespaces contains the definition for IdbConnection?
101. In your ASP.NET web application you want to display a list of clients on a Web page. The client list displays 10 clients at a time, and you require the ability to edit the clients. Which Web control is the best choice for this scenario?
102. How to implement authentication via web.config?
103. You need to store state data that is accessible to any user who connects to your Web application. Which object should you use?
104. Explain the significance of Server .MapPath
105. ________ element in the web.config file to run code using the permissions of a specific user
106. Which of the following is the way to monitor the web application?
107. For your ASP.NET web application your graphics designer created elaborate images that show the product lines of your company. Some of graphics of the product line are rectangular, circular, and others are having complex shapes. You need to use these images as a menu on your Web site. What is the best way of incorporating these images into your Web site?
108. An ASP.NET page uses a Datagrid displays employee information.The Web application supports a large number of concurrent users, who will be saving data from the grid back to the database. It is important that the Web application doesn't overwhelm the Web Server.
109. Which of these data source controls do not implement Caching?
110. Which of the following is the default authentication mode for IIS?
111. When does Garbage collector run?
112. Which of the following is the way to monitor the web application?
113. Which of the following languages are used to write server side scripting in ASP.NET?
114. In which of the following format, output will be rendered to browser When an .aspx page is requested from the web server?
115. Which of the following is true?
116. How ASP.Net Different from classic ASP?
117. Which property of the session object is used to set the local identifier?
118. Which DLL translate XML to SQL in IIS?
119. Which of the following does not have any visible interface?
120. _________ is not a member of ADODBCommand object.