ASP.Net MCQs

ASP.Net was developed by Microsoft, it is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. By using ASP.Net we can build dynamic websites, applications, and services.

ASP.Net MCQs: This section contains multiple-choice questions and answers on ASP.Net. It will help the students to test their skills and prepare well for their exams.

ASP.Net Multiple-Choice Questions

List of ASP.Net MCQs

1. What is the full form ASP?

  1. Access Server Pages
  2. Active Service Pages
  3. Active Server Pages
  4. Access Service Pages

Answer: C) Active Server Pages

Explanation:

ASP stands for Active Server Pages.

Discuss this Question


2. ASP.NET is a ____.

  1. Client-Side technology
  2. Server-side technology
  3. Both
  4. None

Answer: B) Server-side technology

Explanation:

ASP.NET is a server-side technology used for web development.

Discuss this Question


3. Which of the following programming language can be used with ASP.NET?

  1. C#.NET
  2. VB.NET
  3. Both
  4. None

Answer: C) Both

Explanation:

ASP.NET can be used with both C#.NET and ASP.NET for web development.

Discuss this Question


4. What is the extension of the ASP.NET page?

  1. .asp
  2. .aspx
  3. .asx
  4. .apx

Answer: B) .aspx

Explanation:

The extension of ASP.NET page is .aspx.

Discuss this Question


5. Is ASP.NET Web form part of ASP.NET core?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

The ASP.NET web form is not part of the ASP.NET core.

Discuss this Question


Advertisement

6. Which of the following technologies are also used with ASP.NET?

  1. CSS
  2. JavaScript
  3. AJAX
  4. All

Answer: D) All

Explanation:

We can use CSS, JavaScript, and AJAX with ASP.NET for web application development.

Discuss this Question


7. In which form does Postback occur?

  1. Win Forms
  2. HTML Forms
  3. Web Forms
  4. All

Answer: C) Web Forms

Explanation:

The Postback occurs in Web Forms.

Discuss this Question


8. What is the correct use of the web.config file?

  1. To store global information and variable definitions
  2. To configure the domain server
  3. To configure to domain client
  4. Store information about web browser

Answer: A) To store global information and variable definitions

Explanation:

The web.config file is used to store global information and variable definition.

Discuss this Question


9. Is ASP.NET web form supports an event-driven application model?

  1. True
  2. False

Answer: A) True

Explanation:

The ASP.NET web supports an event-driven application model.

Discuss this Question


10. MVC stands for ____.

  1. Model Vocal Controller
  2. Model View Count
  3. Model View Controller
  4. Mode View Controller

Answer: C) Model View Controller

Explanation:

The MVC stands for Model View Controller.

Discuss this Question


Advertisement

11. What namespace is used for ASP.NET Web Form by default?

  1. System.Web.Form
  2. System.Web.UI.Page
  3. System.Web.GUI.Page
  4. System.Web.UI.Form

Answer: D) System.Web.UI.Form

Explanation:

The System.Web.UI.Form namespace is used for ASP.NET web form by default.

Discuss this Question


12. Which of the following attribute must be set on a validator control for the validation?

  1. ControlToValidate
  2. ValidateControl
  3. ValidateToBind
  4. ValidateBind

Answer: A) ControlToValidate

Explanation:

The ControlToValidate attribute must be set on a validator control for the validation.

Discuss this Question


13. Can we style tree view, and menus with CSS?

  1. True
  2. False

Answer: A) True

Explanation:

We can style tree-view, menus with CSS.

Discuss this Question


14. The CSS stands for ____.

  1. Client Style Sheet
  2. Cascading Style Sheet
  3. Common Style Sheet
  4. Cascading Simple Sheet

Answer: B) Cascading Style Sheet

Explanation:

The CSS stands for "Cascading Style Sheet".

Discuss this Question


15. Which term is used for pages that depend on the Master page?

  1. Content Pages
  2. Master Pages
  3. Web Pages
  4. None of the above

Answer: A) Content Pages

Explanation:

The term is used for pages that depend on the Master page are Content Pages.

Discuss this Question


Advertisement

16. Every Server control of ASP.NET must have an id?

  1. True
  2. False

Answer: A) True

Explanation:

Every Server control must have an id.

Discuss this Question


17. Which file contains the Application_Start event?

  1. Global.asax
  2. Web.config
  3. Local.asax
  4. None

Answer: A) Global.asax

Explanation:

The "Global.asax" file contains the Application_Start event.

Discuss this Question


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

  1. Init
  2. Import
  3. Load
  4. All

Answer: B) Import

Explanation:

The Import is not an ASP.NET event.

Discuss this Question


19. What is the return type of IsPostBack property?

  1. Integer
  2. Boolean
  3. Float
  4. All

Answer: B) Boolean

Explanation:

The return type of the IsPostBack property is Boolean.

Discuss this Question


20. Can we use ASPX pages in MVC?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can use ASP pages in the MVC application.

Discuss this Question


Advertisement

21. Which of the following folder is used to store DLL files in the ASP.NET application?

  1. App_Code
  2. App_Data
  3. Bin
  4. App_Local

Answer: C) Bin

Explanation:

The Bin folder is used to store DLL files in the ASP.NET application.

Discuss this Question


22. The ASP.NET developed by?

  1. Google
  2. Oracle
  3. Sun Microsystems
  4. Microsoft

Answer: D) Microsoft

Explanation:

The ASP.NET was developed by Microsoft.

Discuss this Question


23. Which of the following method is used to register client script using code dynamically?

  1. Page.ClientScript.RegisterClientScriptBlock
  2. RegisterScript
  3. Page.ClientScript
  4. None

Answer: A) Page.ClientScript.RegisterClientScriptBlock

Explanation:

The Page.ClientScript.RegisterClientScriptBlock method is used to register client scripts using code dynamically.

Discuss this Question


24. Which is the first event triggered when a user requests an ASP.NET page?

  1. Load
  2. Init
  3. PreInit
  4. PreLoad

Answer: C) PreInit

Explanation:

The PreInit event gets triggered when a user requests an ASP.NET page.

Discuss this Question


25. Which of the following is not an ASP.NET component?

  1. LinkCounter
  2. Counter
  3. AdRotator
  4. File Access

Answer: A) LinkCounter

Explanation:

The LinkCounter is not an ASP.NET component.

Discuss this Question


26. Which of the following Session Mode Serialization is not required to store the data?

  1. SQLServer
  2. StateServer
  3. InProc
  4. None

Answer: C) InProc

Explanation:

The InProc Session Mode Serialization is not required to store the data.

Discuss this Question


27. Which development model(s) is/are supported by ASP.Net?

  1. Asp.Net Web Forms
  2. Asp.Net MVC
  3. Asp.Net Web Pages
  4. Asp.Net API
  5. All of the above

Answer: E) All of the above

Explanation:

ASP supports many different development models:

  • Classic ASP
  • ASP.NET Web Forms
  • ASP.NET MVC
  • ASP.NET Web Pages
  • ASP.NET API
  • ASP.NET Core

Discuss this Question


28. The SessionIDs are stored in ____ by ASP.Net?

  1. Cache
  2. Server
  3. Database
  4. Cookies

Answer: D) Cookies

Explanation:

By default, the session IDs are stored in Cookies.

Discuss this Question


29. Which is the correct basic syntax of Application directive?

  1. <%@ Application Language="C#" %>
  2. <!-- Application Language="C#" -->
  3. <%@ Application_DIR Language="C#" %>
  4. <%@ DIR @Application Language="C#" %>

Answer: A) <%@ Application Language="C#" %>

Explanation:

The basic syntax of the Application directive is:

<%@ Application Language="C#" %>

Discuss this Question


30. Which is the correct basic syntax of the Assembly directive?

  1. <%@ Assembly @ Name ="myassembly" %>
  2. <%@@ Assembly Name ="myassembly" %>
  3. <%@ Assembly Name ="C# myassembly" %>
  4. <%@ Assembly Name ="myassembly" %>

Answer: D) <%@ Assembly Name ="myassembly" %>

Explanation:

The basic syntax of the Assembly directive is:

<%@ Assembly Name ="myassembly" %>

Discuss this Question


Advertisement

31. Which is the correct basic syntax of the Control directive?

  1. <%@ Control %>
  2. <%@ Control Language="C#" EnableViewState="false" %>
  3. <%@ Control Language="C#" %>
  4. None of the above

Answer: B) <%@ Control Language="C#" EnableViewState="false" %>

Explanation:

The basic syntax of the Control directive is:

<%@ Control Language="C#" EnableViewState="false" %>

Discuss this Question


32. What is the file extension of Webservices in ASP.Net?

  1. .aspx
  2. .asp
  3. .asm
  4. .asmx

Answer: D) .asmx

Explanation:

The file extension of Webservices in ASP.Net is .asmx

Discuss this Question


33. Which protocol is used to call a web service?

  1. SOAP Protocol
  2. HTTP Protocol
  3. TCP Protocol
  4. FTP Protocol

Answer: B) HTTP Protocol

Explanation:

In ASP.Net, HTTP protocol is used to call a web service.

Discuss this Question


34. What is the parent class of all web server control in ASP.Net?

  1. System.Web.UI.Control
  2. System.Web.Control
  3. System.Web.UI.WebServer
  4. All of the above

Answer: A) System.Web.UI.Control

The parent class of all web server control in ASP.Net is System.Web.UI.Control. The System.Web.UI.Control class can directly or indirectly be used as part of the user interface for your Web application.

Discuss this Question


35. What is the difference between session object and application object in ASP.Net?

  1. The session object is used to maintain the session of each user while an application object is created while a user enters in the application
  2. Session objects are created on the server while application objects are created on the client side.
  3. Session objects are used to handle database communication while application objects are used to handle communication between two different domains.
  4. All of the above

Answer: A) The session object is used to maintain the session of each user while an application object is created while a user enters in the application

Explanation:

The difference between a session object and an application object in ASP.Net is that: Session object is used to maintain the session of each user while an application object is created while a user enters the application.

Discuss this Question


36. What is the difference between Debug and Trace class in ASP.Net?

  1. The Debug class is used to debug both builds and releases while the Trace class is used to debug the builds only
  2. Debug class is used in ASP core while Trace is used in ASP MCC
  3. The Debug class is used to debug the builds while the Trace class is used to debug both builds and releases
  4. All of the above

Answer: C) The Debug class is used to debug the builds while the Trace class is used to debug both builds and releases

Explanation:

The difference between Debug and Trace class in ASP.Net is - The Debug class is used to debug the builds while the Trace class is used to debug both builds and releases.

Discuss this Question


37. In ____, a non-virtual method is called which is decided at a compile time.

  1. Late binding
  2. Early binding
  3. Lazy binding
  4. Global binding

Answer: B) Early binding

Explanation:

In early binding, a non-virtual method is called which is decided at a compile time.

Discuss this Question


38. In ____, a virtual method is called which is decided at runtime.

  1. Late binding
  2. Early binding
  3. Lazy binding
  4. Global binding

Answer: A) Late binding

Explanation:

In late binding, a virtual method is called which is decided at runtime.

Discuss this Question


39. Which method is used to sign out from forms authentication?

  1. Authentication.SignOut()
  2. Forms.UI.SignOut()
  3. FormsAuthentication.LogOut()
  4. FormsAuthentication.SignOut()

Answer: D) FormsAuthentication.SignOut()

Explanation:

To sign out from forms authentication - The FormsAuthentication.SignOut() method is used.

Discuss this Question


40. The ____ class is used to summarize the error messages from all validators on a Web page in a single location.

  1. ValidationSummary
  2. Validation
  3. ErrorSummary
  4. Debug

Answer: A) ValidationSummary

Explanation:

The ValidationSummary class is used to summarize the error messages from all validators on a Web page in a single location.

Discuss this Question


41. Which method is used in ASP.Net to preserve page and control values between round trips?

  1. Restore
  2. Modeling
  3. View State
  4. Model Preserve

Answer: C) View State

Explanation:

The View State method is used to preserve page and control values between round trips in ASP.Net.

Discuss this Question


42. What is the default timeout for a cookie in ASP.Net?

  1. 10 Minutes
  2. 20 Minutes
  3. 30 Minutes
  4. 5 Minutes

Answer: C) 30 Minutes

Explanation:

The default time timeout for a cookie in ASP.Net is 30 minutes.

Discuss this Question


43. What is the full form of SOAP in ASP.Net?

  1. Simple Object Access Protocol
  2. Simple Object Advanced Protocol
  3. Simple Object Access Property
  4. Simple Object Advanced Property

Answer: A) Simple Object Access Protocol

Explanation:

In ASP.Net, the SOAP stands for Simple Object Access Protocol.

Discuss this Question


44. The Global.asax file is derived from the ____ class.

  1. System.UI
  2. SoapApplication
  3. Application
  4. HttpApplication

Answer: D) HttpApplication

Explanation:

The Global.asax file is derived from the HttpApplication class.

Discuss this Question


45. Which is not a page event in ASP.Net?

  1. PreLoad
  2. Load
  3. LoadComplete
  4. UpLoad

Answer: D) UpLoad

Explanation:

"UpLoad" is not a page event in ASP.Net.

Discuss this Question


46. How many navigation controls are in ASP.NET?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: B) 3

Explanation:

In ASP.Net, there are three navigation controls, they are:

  • SiteMapPath
  • Menu
  • TreeView

Discuss this Question


47. Can an ASP.Net web application run without web.config file?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, an ASP.Net web application can run without web.config file.

Discuss this Question


48. Which is/are the component(s) of ADO.NET?

  1. Dataset
  2. Data Reader
  3. Data Adaptor
  4. Command
  5. Connection
  6. All of the above

Answer: F) All of the above

Explanation:

The components of ADO.Net are Dataset, Data Reader, Data Adaptor, Command, and connection.

Discuss this Question


49. In ____ page processing transfers from one page to the other page without making a round-trip back to the client's browser.

  1. Response.Redirect
  2. Server.Redirect
  3. Client.Transfer
  4. Server.Transfer

Answer: D) Server.Transfer

Explanation:

In Server.Transfer page processing transfers from one page to the other page without making a round-trip back to the client's browser.

Discuss this Question


50. ____is used to redirect the user's browser to another page or site.

  1. Response.Redirect
  2. Server.Redirect
  3. Client.Transfer
  4. Server.Transfer

Answer: A) Response.Redirect

Explanation:

Response.Redirect is used to redirect the user's browser to another page or site.

Discuss this Question


51. Which is the correct syntax to add an event handler in ASP.Net?

  1. Attributes("Event","Javascript_Code();")
  2. Attributes.Add("Event","Javascript_Code();")
  3. Attributes.Handle("Event","Javascript_Code();")
  4. None of the above

Answer: B) Attributes.Add("Event","Javascript_Code();")

Explanation:

The correct syntax to add an event handler in ASP.Net is:

Attributes.Add("Event","Javascript_Code();")

Discuss this Question


52. How many types of caching are there in ASP.Net?

  1. 2
  2. 3
  3. 4
  4. 6

Answer: B) 3

Explanation:

In ASP.Net, there are three types of caching, they are:

  • Output Caching
  • Fragment Caching
  • Data Caching

Discuss this Question


ADVERTISEMENT
ADVERTISEMENT




Comments and Discussions!




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.