Asp.Net MCQ Quiz with Answer

asp .net quiz

Return to Programming Language Quiz List

Question 1: Which control defaults to displaying the files in the current directory?

(A) List Box

(B) Drive List Box

(C) Dir List Box

(D) File List Box

View Answer
(D) File List Box

Question 2: ___________ debugging tools come with the .NET SDK.

(A) CorDBG – command-line debugger

(B) Dbg CLR – graphic debugger

(C) Both A and B

(D) None

View Answer
(C) Both A and B

Question 3: Which of the function is used to check textbox only contain number?

(A) char.IsLetter

(B) char.IsDigit

(C) char.IsLetterOrDigit

(D) char.IsNumber

View Answer
(B) char.IsDigit

Question 4: What are the Activation modes for .NET Remoting?

(A) Singleton

(B) Singlecall

(C) Both

(D) None of above

View Answer
(C) Both

Question 5: Which of the following events will fire when the Insert key is pressed?

(A) KeyDown,KeyPress

(B) KeyDown

(C) KeyPress

(D) KeyUp

View Answer
(A) KeyDown,KeyPress

Question 6: What is the last stage of the Web forms lifecycle?

(A) Page_Load

(B) Event Handling

(C) Page_Unload

(D) Validate

View Answer
(C) Page_Unload

Question 7: How does ASP.NET store SessionIDs by default?

(A) In cookies

(B) In cache

(C) In URL strings or in a database

(D) In a global variable

View Answer
(A) In cookies

Question 8: What namespace does the Web page belong in the .NET Framework class hierarchy?

(A) System.Web.RootBuilder

(B) System.Web.Control

(C) System.Web.UI.Page

(D) System.Web.UserControl

View Answer
(C) System.Web.UI.Page

Question 9: Where would you define application and session level events?

(A) Default.aspx

(B) Global.asax

(C) General.aspx

(D) Web.Config

View Answer
(B) Global.asax

Question 10: What attribute must be set on a validator control for the validation to work?

(A) Validate

(B) ValidateControl

(C) ControlToBind

(D) ControlToValidate

View Answer
(D) ControlToValidate

Question 11: Which of the following contains web application settings?

(A) app.config

(B) web.config

(C) assembly.config

(D) machine.config

View Answer
(B) web.config

Question 12: What is default time of expire session?

(A) 20 minute

(B) 40 minute

(C) 100 minute

(D) 1200 hours

View Answer
(A) 20 minute

Question 13: What DataType is return in IsPostback property?

(A) bit

(B) Boolean

(C) int

(D) string

View Answer
(B) Boolean

Question 14: Which method do you invoke on the Data Adapter control to load your generated dataset?

(A) Fill( )

(B) Read( )

(C) ExecuteQuery( )

(D) None of above

View Answer
(A) Fill( )

Question 15: How do you manage states in asp.net application?

(A) Session Objects

(B) Application Objects

(C) Viewstate

(D) All of the above

View Answer
(D) All of the above

Question 16: Which data control does not exist in asp.net?

(A) GridView

(B) DataList

(C) Repeater

(D) tableView

View Answer
(D) tableView

Question 17: Which is not a validation control?

(A) Required Field Validator

(B) Compare Validator

(C) Error Validator

(D) Regular Expression Validator

View Answer
(C) Error Validator

Question 18: When will a session be started in an application?

(A) Before Application Started

(B) After Application Started

(C) When the Client first sends a request to browser

(D) While closing the application

View Answer
(C) When the Client first sends a request to browser

Question 19: Which control is used to sort the data and allow paging?

(A) Datalist

(B) Repeater Control

(C) DataGrid

(D) None of above

View Answer
(C) DataGrid

Question 20: What is the Web.config file used for?

(A) To store the global information and variable definitions for the application

(B) Configures the time that the server-side codebehind module is called

(C) To configure the web server

(D) To configure the web browser

View Answer
(A) To store the global information and variable definitions for the application

Question 21: What is used to validate complex string patterns like an e-mail address?

(A) Extended expressions

(B) Regular expressions

(C) Irregular expressions

(D) Basic expressions

View Answer
(B) Regular expressions

Question 22: Which namespace is used when we connect our asp.net page to sql server?

(A) System.data.sqlclient

(B) System.data.sql

(C) System.sqlserver

(D) System.url

View Answer
(A) System.data.sqlclient

Question 23: Which of the following is not supported for IIS?

(A) Windows XP Professional

(B) Windows XP Home

(C) Windows 2003 Server

(D) Windows 2000 Server

View Answer
(B) Windows XP Home

Question 24: The process in which a web page sends data back to the same page on the server is called?

(A) PostBack

(B) Session

(C) Query strings

(D) All the above

View Answer
(A) PostBack

Question 25: What’s the difference between Response.Write() and Response.Output.Write()?

(A) Both are Same

(B) Write Formatted Output

(C) Write data to a file

(D) None of above

View Answer
(B) Write Formatted Output

Question 26: Which method do you invoke on the DataAdapter control to load your generated dataset with data?

(A) DataBind()

(B) Populate()

(C) Bind()

(D) Fill()

View Answer
(D) Fill()

Question 27: In order to get assembly info which namespace we should import?

(A) system.reflection

(B) System.Collections.Generic

(C) System.Configuration

(D) System.assembly

View Answer
(A) system.reflection

Question 28: What methods are fired during the page load?

(A) Unload()

(B) PreRender()

(C) Load()

(D) All the above

View Answer
(B) PreRender()

Question 29: What is the full form of WSDL?

(A) Web Services Description Language

(B) Web Services Designing Language

(C) Windows Services Designing Language

(D) None of above

View Answer
(A) Web Services Description Language

Question 30: A process where items are removed from cache in order to free the memory based on their priority?

(A) CachePriority

(B) CacheElementPriority

(C) CacheItemPriority

(D) None

View Answer
(C) CacheItemPriority