What does ASP.NET stand for?
A) Active Server Pages Network
B) Application Service Pages.NET
C) Active Server Pages.NET
D) Application Service Protocol.NET
Answer: C) Active Server Pages.NET
Which language is primarily used to develop ASP.NET applications?
A) Java
B) C#
C) Python
D) Ruby
Answer: B) C#
ASP.NET is a part of which framework?
A) .NET Framework
B) Java Framework
C) PHP Framework
D) Ruby on Rails Framework
Answer: A) .NET Framework
ASP.NET applications are:
A) Client-side applications
B) Server-side applications
C) Desktop applications
D) Console applications
Answer: B) Server-side applications
Which of the following is the default programming model in ASP.NET?
A) MVC
B) Web Forms
C) Razor Pages
D) SignalR
Answer: B) Web Forms
Which of the following is an ASP.NET component?
A) GridView
B) Label
C) Button
D) All of the above
Answer: D) All of the above
Which method is used to redirect to another page in ASP.NET?
A) Response.Redirect()
B) Page.Redirect()
C) Server.Redirect()
D) None of the above
Answer: A) Response.Redirect()
What is ViewState in ASP.NET?
A) A mechanism to maintain state of a webpage
B) A method to store session data
C) A security feature
D) A type of cookie
Answer: A) A mechanism to maintain state of a webpage
Which object is used to store information across a user session in ASP.NET?
A) Request
B) Response
C) Session
D) Application
Answer: C) Session
ASP.NET applications run on which platform?
A) Linux
B) Windows
C) iOS
D) Android
Answer: B) Windows
What is the default authentication mode for ASP.NET?
A) Forms
B) Windows
C) Passport
D) None
Answer: B) Wind
Which of the following is a type of validation control in ASP.NET?
A) RequiredFieldValidator
B) CompareValidator
C) RangeValidator
D) All of the above
Answer: D) All of the above
In ASP.NET, which file extension is used for Web Forms?
A) .aspx
B) .html
C) .xml
D) .asp
Answer: A) .aspx
Which directive defines the programming language for a Web Form in ASP.NET?
A) @Language
B) @Page
C) @Form
D) @Control
Answer: B) @Page
What is the full form of ADO.NET?
A) Active Data Objects.NET
B) Application Data Objects.NET
C) Advanced Data Objects.NET
D) ActiveX Data Objects.NET
Answer: D) ActiveX Data Objects.NET
What does the Web.config file contain?
A) Database settings
B) Configuration settings
C) Security settings
D) All of the above
Answer: D) All of the above
Which of the following is used to handle errors in ASP.NET?
A) ErrorProvider
B) CustomValidator
C) Try-Catch block
D) None of the above
Answer: C) Try-Catch block
How can you prevent a Web Form from being submitted multiple times?
A) Disable ViewState
B) Disable JavaScript
C) Use Anti-Forgery Token
D) Disable button after submit
Answer: D) Disable button after submit
What is Postback in ASP.NET?
A) A technique to refresh the server
B) A process where a webpage sends data to the server and reloads itself
C) A debugging technique
D) A method to cache data
Answer: B) A process where a webpage sends data to the server and reloads itself
Which method is used to register a client-side script in ASP.NET?
A) Page.RegisterStartupScript()
B) Page.RegisterClientScriptBlock()
C) Page.RegisterClientScript()
D) Page.AddScript()
Answer: B) Page.RegisterClientScriptBlock()
Which of the following can be used to maintain user information across pages?
A) Cookies
B) Query Strings
C) Session
D) All of the above
Answer: D) All of the above
Which control allows users to select only one option from a group of choices in ASP.NET?
A) CheckBox
B) DropDownList
C) RadioButton
D) ListBox
Answer: C) RadioButton
Which is the most commonly used method to handle events in ASP.NET?
A) Delegates
B) Sessions
C) Postback
D) Event Handlers
Answer: D) Event Handlers
Which method is used to end a user’s session in ASP.NET?
A) Session.Remove()
B) Session.Abandon()
C) Session.End()
D) Session.Clear()
Answer: B) Session.Abandon()
Which object in ASP.NET can be used to read cookies?
A) Response
B) Session
C) Application
D) Request
Answer: D) Request
What is the use of the GridView control in ASP.NET?
A) Display tabular data
B) Display images
C) Create dynamic buttons
D) Handle authentication
Answer: A) Display tabular data
Which of the following is used to execute SQL queries in ASP.NET?
A) SqlConnection
B) SqlCommand
C) SqlDataAdapter
D) All of the above
Answer: B) SqlCommand
Which of the following is used to store the output of SQL queries in ASP.NET?
A) DataTable
B) DataSet
C) SqlDataReader
D) All of the above
Answer: D) All of the above
Which of the following is not a lifecycle event of an ASP.NET page?
A) Page_Init
B) Page_Load
C) Page_PreRender
D) Page_Submit
Answer: D) Page_Submit
Which tool is used to deploy ASP.NET applications?
A) WebMatrix
B) Visual Studio
C) Web Depoly
Which of the following databases is commonly used with ASP.NET applications?
A) MySQL
B) Oracle
C) SQL Server
D) PostgreSQL
Answer: C) SQL Server
What is the primary purpose of ASP.NET MVC?
A) Create APIs
B) Separate application logic, user interface, and user input
C) Perform client-side validation
D) Manage security
Answer: B) Separate application logic, user interface, and user input
What does Razor syntax in ASP.NET MVC allow developers to do?
A) Write client-side JavaScript
B) Embed server-side code into web pages
C) Write database queries
D) Perform CSS styling
Answer: B) Embed server-side code into web pages
Which file is used for routing configuration in ASP.NET MVC?
A) Web.config
B) Startup.cs
C) Route.config
D) Global.asax
Answer: D) Global.asax
Which method is used to bind data to controls in ASP.NET?
A) BindControl()
B) DataBind()
C) ControlBind()
D) None of the above
Answer: B) DataBind()
What is the maximum size of a QueryString in ASP.NET?
A) 1024 characters
B) 2048 characters
C) 4096 characters
D) Unlimited
Answer: B) 2048 characters
What is IIS?
A) Internet Interface Service
B) Internet Information Server
C) Intranet Information Server
D) Interface Information Service
Answer: B) Internet Information Server
Which protocol does ASP.NET use for data transmission?
A) FTP
B) TCP/IP
C) HTTP/HTTPS
D) UDP
Answer: C) HTTP/HTTPS
Which of the following is a default HTTP method supported in ASP.NET Web Forms?
A) GET
B) POST
C) PUT
D) Both A and B
Answer: D) Both A and B
What is ASP.NET Core?
A) A framework for building modern cloud-based applications
B) A desktop application framework
C) A mobile development framework
D) None of the above
Answer: A) A framework for building modern cloud-based applications
Which feature of ASP.NET Core allows it to run on multiple platforms?
A) Dependency Injection
B) Middleware
C) Cross-platform compatibility
D) .NET Core runtime
Answer: D) .NET Core runtime
What is the purpose of the Middleware component in ASP.NET Core?
A) Handle client-side requests
B) Handle HTTP requests and responses in a pipeline
C) Manage database connections
D) Manage session state
Answer: B) Handle HTTP requests and responses in a pipeline
Which templating engine is used in ASP.NET Core?
A) Razor
B) Mustache
C) Handlebars
D) Angular
Answer: A) Razor
Which feature in ASP.NET Core allows for versioning of APIs?
A) Routing
B) Middleware
C) API Versioning
D) Dependency Injection
Answer: C) API Versioning
In ASP.NET Core, which service is used for logging?
A) ILogger
B) ILogService
C) LogManager
D) LogCore
Answer: A) ILogger
Which of the following HTTP status codes indicates a successful response in ASP.NET?
A) 200
B) 404
C) 500
D) 403
Answer: A) 200
Which class is used to send emails in ASP.NET?
A) SmtpClient
B) MailClient
C) EmailService
D) None of the above
Answer: A) SmtpClient
Which of the following is an authentication method in ASP.NET?
A) Windows Authentication
B) Forms Authentication
C) Passport Authentication
D) All of the above
Answer: D) All of the above
What is the default file type for ASP.NET MVC views?
A) .aspx
B) .html
C) .cshtml
D) .xml
Answer: C) .cshtml
What is SignalR in ASP.NET?
A) A library for managing user authentication
B) A library for real-time web functionality
C) A logging framework
D) A session management tool
Answer: B) A library for real-time web functionality