The following ASP.NET MCQs have been compiled by our experts through research, in order to test your knowledge of the subject of ASP.NET. We encourage you to answer these multiple-choice questions to assess your proficiency.
Please continue by scrolling down.
A. root directory of bootable drive
B. windows directory
C. application root directory
D. application / bin directory
A. Session Objects
B. Application Objects
C. Viewstate
D. (all of these)
A. Winforms
B. Webforms
C. HTMLForms
A. .Ascx
B. .Asmx
C. .Aspx
A. runat
B. text
C. name
D. bgcolor
A. Programming Language
B. Server Side Technology
A. ExecuteCommand()
B. Pause()
C. Start()
D. Stop()
A. Yes
B. No
A. MVC 4
B. MVC 2
C. MVC 3
D. MVC 1
A. Bin
B. App_Code
C. App_GlobalResources
D. App_Data
A. Runat = "Server"
B. ID = "TextBox2"
C. ClientID = "TextBox1"
D. RunatServer = "True"
A. validatecontrol
B. ControlToValidate
C. controltobind
D. validate
A. .ascx
B. .aspx
C. .asax
D. .asmx
A. it will not point to any location
B. points to the location where your project stored
C. there is no such function in asp.net
D. points to C:\\My Documents\Microsoft Visual Studio folder
A. Equals() method
B. RegularExpressionValidator
C. CompareValidator
D. Required Field Validator
A. Page.Init()
B. Page.Load()
C. Page.OnLoad()
D. Page.PreInit()
A. aspdotnetdatabaase
B. aspnetdb
C. aspdotnetdb
D. netdb
A. VB.NET
B. Managed C++
C. Java
D. C#, J#
E. COBOL.NET, Perl.NET
A. Only Session State Service
B. (all of these)
C. Only In-Process storage
D. Only SQL Server
A. 20 ns
B. 20 min
C. 10ns
D. 10min
E. 1 hr
A. <identity impersonate = "true" />
B. <setImpersonate = "true" />
C. <impersonate = "true" />
D. <identity setImpersonate = "true" />
A. in cookies
B. in session variables
C. in the HTML hidden fields.
D. query string
E. in database
A. Page.Load
B. PreLoad
C. Init
D. PreInit
A. No
B. Yes
A. Delegates
B. Arrays
C. Nullable Types
D. Indexers
A. async=true on page directive, RegisterAsyncTask in page load and async method
B. async method
C. TaskFactory.StartNew(method1)
D. async=true on page directive
A. return an async Task
B. return an async Task from controller action while awaiting within the method
C. return an async Task from controller action
D. Register async controller action in Global.asax
A. Only in .NET 4.5
B. Only MVC and Web Forms, not Web API
C. Yes
D. No
A. not possible
B. @Html.AntiForgeryToken() in View
C. @Html.AntiForgeryToken() in View and ValidateAntiForgeryToken attribute on controller action
D. Web.Config app setting AntiForgeryToken true
A. XML
B. All of these
C. xVx
D. ATOM Pub
A. False
B. True
A. ThreadLock
B. Synchronize()
C. Lock() and UnLock()
A. System.Web.UI.Page.Culture
B. System.Web.Locale
C. System.Web.UI.Page.User
D. System.Web.UI.Page.Locale
A. True
B. False
A. Root
B. /bin
C. GAC
A. None of the above
B. Parent is the immediate node a level above, Ancestors is all nodes all levels above.
C. Parent is the immediate node a level above, Ancestors is all nodes above and below.
D. Parent is the immediate node below, Ancestors is all nodes above and below.
A. INamingContainer
B. IExtenderCtonrol
C. IDataKeysControl
D. IDataItemContainer
A. Runtime error
B. Yes
C. It will not compile if there is no web.config file
D. No
A. Only in .NET 4+
B. No
C. Only if LabelTest.Text is changed in following events before PreRender
D. Yes
A. Controller
B. Mvc Handler
C. Routing
D. View Engine
E. Action Execution
A. Session Object
B. InProcess
C. StateServer
A. Culture and Locale
B. Keyword and Description
C. MetaKeyword and MetaDescription
D. Culture and Description
A. ILDASM.dll
B. ILDASM.inc
C. ILDASM.exe
D. ILDASM.aspx
A. SQL Server
B. Inproc
C. None
D. StateServer
A. By setting the EnableClientScript property to false
B. by setting CauseValidation to false
C. By setting ValidateClientScript to false
D. By setting EnableScripting to false
E. By setting ValidateScripting to false
A. Need for REST
B. Need for XML
C. Need for metadata
D. Need for SOAP
A. web
B. page
C. import
D. register
A. 20
B. 1
C. more than 30
D. 10
A. Change sessionstate mode to InProc
B. Change the property type to HashSet
C. Add the Serializable attribute to Custom class
D. All of these will work
A. System.Environment.UserName
B. System.UserName
C. System.Environment.User
D. System.Environment.GetUserName
A. RedirectPermanent() method
B. Page.Redirect(true) method
C. PermanentRedirect() method
D. Redirect(true) method
A. Base, Custom and Enhanced
B. Base, Custom and High
C. Pooled, Non pooled, Not set
D. Low, Medium and High
A. the string email will not have the right value.
B. There is nothing wrong in this code.
C. the string email will not have the right value and the SQL is subject to injection attacks.
D. the SQL is subject to injection attacks.
E. a SqlDataReader can't be instantiated from a SqlCommand object.
A. BeginRequest, AuthenticateRequest, AuthorizeRequest, AcquireRequestState, ResolveRequestCache, ProcessRequest, UpdateRequestCache, ReleaseRequestState, EndRequest.
B. BeginRequest, ResolveRequestCache, AuthenticateRequest, AuthorizeRequest, AcquireRequestState, ProcessRequest, ReleaseRequestState, UpdateRequestCache, EndRequest.
C. BeginRequest, AuthorizeRequest, AuthenticateRequest, ResolveRequestCache, AcquireRequestState, ProcessRequest, ReleaseRequestState, UpdateRequestCache, EndRequest.
D. BeginRequest, AuthenticateRequest, AuthorizeRequest, ResolveRequestCache, AcquireRequestState, ProcessRequest, ReleaseRequestState, UpdateRequestCache, EndRequest.
A. <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
B. <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
C. <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/> <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
A. Can only be bound to a data sources or objects that are data bound in code behind
B. Strongly typed object binding
C. Uses CSS div’s instead of html table based layout
D. Uses AJAX functionality by default
A. Controller extends ODataController
B. Return IQueryable or IEnumerable
C. Controller extends EntitySetController<T>
D. All of these
A. True
B. False
A. System.Activator
B. ProxyWebPartManager
C. None of the Above
D. WebPartManager
A. None of these
B. Page_Error
C. All of these
D. Page_Dispose
A. <pages applyTheme="Windows7" />
B. <pages theme="Windows7" />
C. <pages themesEnabled="true" />
D. <pages theme="true" />
A. IO intensive
B. All controller actions should be made async
C. CPU intensive
D. CPU & IO intensive
A. SpinLock
B. lock
C. SpinWait
D. MemoryBarrier
A. IEnumerable or IQueryable
B. Auto or manual
C. Chunked, ranged or hashed
D. AsParallel().WithDegreeOfParallelism()
A. Set CookieEnabled = false in all pages
B. Set IsCookieEnabled to false in all pages
C. Set Cookie to false in all pages
D. Set Cookie.Discard property to true
A. PartialUpdatesEnabled in global.asax.cs
B. PartialUpdatesEnabled setting in web.config
C. Delta
D. Patch
A. None of these
B. Threading
C. Parallel Programming
D. Multi-core Processors
A. IEnumerable is thread safe by default because each iterator gets an IEnumerator
B. IEnumerable is a push based sequence
C. IEnumerable is both push and pull based
D. IEnumerable is a pull based sequence
A. Request.PhysicalApplicationPath
B. Server.MapPath('~/')
A. Cache.SetAbsoluteExpiration
B. Cache.AbsoluteExpiration
C. Cache.NoExpiration
D. Cache.NoSlidingExpiration
A. Task<object>
B. List<Object>
C. Task<>
D. async
A. System.Data.Annotation()
B. System.GC.Collect() method
C. System.Collect.GC() method
A. Relative
B. Absolute
A. Master Page
B. Theme
C. All of them
D. Customization
E. None of the Above
A. False
B. True
A. Query Strings
B. Hidden fields
C. Cookies
D. All these
E. Viewstate
A. Page_Load()
B. Page_Init()
A. ImageButton
B. LinkButton
C. Button
D. Image
A. Session.Killer();
B. Session.Abandon();
C. Session.Abort();
A. True
B. False
A. Cryptography Next Generation (CNG) classes are supported on XP andVista systems.
B. The System.Security.Cryptography.AesManaged class allows custom block size, iteration counts and feedback modes to support any Rijndael based encryption.
C. Support is provided for the 'Suite B' set of cryptographic algorithms as specified by the National Security Agency (NSA).
D. All of the above
A. UserControl can directly express rendering information via markup; a CustomServer control can not.
B. UserControl can make use of script based validation; a Custom Server control cannot.
C. UserControl can represent complete compositate hierarchy; a Custom Server control cannot.
D. UserControl does not require the use of the @Register directive; a Custom Server control does require it.
A. No
B. Yes
A. Set EnableClientScript property to false.
B. Set DisableClientScript property to true.
C. Delete the EnableClientScript property in the markup code.
D. Set EnableScript property to false.
A. ToUpper()
B. ToUpperString()
C. toUpperCase()
D. ToUpperCase()
E. Toupper()
A. ASP.NET Service File
B. ASPX service file
C. Windows Communication Foundation service file
D. AJAX service file
A. System.Web.Form
B. System.Web. UI.Form
C. System. Web. GUI.Page
D. System.Web. UI.Page
A. Using System.Web.Mvc.AuthorizeAttribute() in each method
B. Using System.Web.Mvc.AuthorizeAttribute() in each controller
C. Registering System.Web.Mvc.AuthorizeAttribute() in RegisterGlobalFilters
A. HeaderStyle
B. PagerStyle
C. FooterStyle
A. Session.Flush() method
B. Session.Kill(true) method
C. Session.Kill() method
D. Session.Abandon() method
A. Session level
B. Database level
C. All these
D. Application level
A. ClientID
B. ClientSideID
C. ID
D. Name
A. VBScript
B. PERL
C. JavaScript
A. FormsAuthentication.Signout()
B. FormsAuthentication.Login()
C. UserAuthentication.Signout()
D. UserAuthentication.Logout()
E. FormsAuthentication.Logout()
A. System.Web.Page
B. System.Web.UI.Page
C. System.Web.UI
A. 30 minutes
B. 20 minutes
C. 40 minutes
D. 60 minutes
A. MTA
B. STA
C. Not supported
D. Single Threaded
A. Reads from the URI path and querystring
B. A custom parameter binding that can read any part of the HTTP request
C. Reads the message body only
D. Reads the message body and serializes the response
A. MVVM
B. Page Class Inheritance
C. Model View Controller
D. Code Behind
E. Class Responsibility Collaboration
A. None
B. SQL Server
C. Inproc
D. StateServer