Home

1000+ Asp Programming Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. To redirect an user to a particular page when a user logs in use
A. Use Response.Redirect in Session_Start event of Global.asax file
B. Use Response.Redirect in Application_Start event of Global.asax file
C. Use Server.MapPath in Session_Start event of Global.asax file
D. Use Server.MapPath in Application_Start event of Global.asax file
Answer : A
2. To display HTML tags as it is use
A. Encode
B. HTMLEncode
C. URLEncode
D. EncodeHTML
Answer : B
3. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
4. Which DLL translate XML to SQL in IIS?
A. SQLISAPI.dll
B. SQLXML.dll
C. LISXML.dll
D. SQLIIS.dll
Answer : A
5. __________.CreateObject("ADODB.Connection") creates a new connection.
A. Session
B. Request
C. Response
D. Server
Answer : D
6. This property is inapplicable in DropDownList
A. SelectionMode
B. Items
C. DataMember
D. None of the above
Answer : A
7. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
8. HTML tag equivalent to Panel is
A. Div
B. Br
C. P
D. Span
Answer : A
9. File extension used for ASP.NET files.
A. .Web
B. .ASP
C. .ASPX
D. None of the above
Answer : B
10. Why is Global.asax is used?
A. Declare Global variables
B. Implement application and session level events
C. No use
D. Both a and b
Answer : B
11. By default a WebForm inherits from
A. System.Web.Page
B. System.UI.Page
C. System.Web.UI.Page
D. System.Web.Form.Page
Answer : C
12. One difference between ASP.NET and ASP is that ASP is more structure than ASP.NET
A. True
B. False
C.
D.
Answer : B
13. If someone accidentally deletes the Page Directive of an ASP.NET page say "First.aspx" under "Sales", what will you do?
A. <%@ Page Language="vb" Codebehind="FirstQuarter.aspx.vb" Inherits="FirstQuarter"%>
B. <%@ Page Language="vb" Codebehind="FirstQuarter.aspx.vb" ClassName="Sales.FirstQuarter"%>
C. <%@ Page Language="vb" Codebehind="FirstQuarter.aspx.vb" Inherits="Sales.FirstQuarter"%>
D. <%@ Page Language="vb" Codebehind="FirstQuarter.aspx.vb" ClassName="Sales.FirstQuarter" Inherits="FirstQuarter"%>
Answer : C
14. To read an XML file from ASP.NET use
A. XMLTextReader
B. XMLReader
C. XML.Reader
D. ReadXML
Answer : A
15. 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
Answer : B
16. To count the number of times an user visited a page, use
A. Session variables
B. Application variables
C. Cookies
D. Server variables
Answer : C
17. ____________ enables you to add, modify and delete records and you will see the changes made by other users
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : C
18. Which of the following tool is used to manage the GAC?
A. RegSvr.exe
B. GacUtil.exe
C. GacSvr32.exe
D. GacMgr.exe
Answer : B
19. CDO stands for _________________ .
A. Collaborative Database Object
B. Collaborative Data Object
C. Collaborative Distributed Object
D. Complete Data Object
Answer : B
20. To write an attribute for a tag through ASP.NET use
A. WriteAttribute
B. WriteStartAttribute
C. WriteAttributeString
D. WriteElementString
Answer : C
21. .FileInfo gives information about any file and .File gives information about a particular file
A. True
B. False
C.
D.
Answer : B
22. 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
Answer : A
23. Under Button Click the following code is written
1. Dim I =10
2. MsgBox(I)

A. Problem is in line 1
B. Problem is in line 2
C. Will display 10 in a message box
D. Compilation Error
Answer : C
24. Caching type supported by ASP.Net
A. Output Caching
B. DataCaching
C. a and b
D. none of the above
Answer : C
25. What namespace contains the classes for file and directory access?
A. System.IO
B. System.File.IO
C. System.Data
D. System.IO.Data
Answer : A
26. In ___________ records are read-only and cannot be changed.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : A
27. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
28. A _____________ is a logical naming scheme for grouping related types of
A. objects together.
B. class
C. namespace
D. interface
Answer : C
29. To set text programmatically without adding extra HTML tags use
A. Literal
B. Response.Write
C. Both of the above
D. None of the above
Answer : C
30. ___________ controls how proxy servers temporarily store web pages
A. Expires
B. CacheControl
C. ExpiresAbsolute
D. None of the above
Answer : B
31. In ASP.NET a page is inherited from System.Web.UI.Page. Here UI means
A. Universal Indicator
B. Uniform Indicator
C. User Interface
D. Universal Interface
Answer : C
32. CDONTS is designed on for Windows NT Server
A. True
B. False
C.
D.
Answer : A
33. In a DataSet if multible tables are used, they are identified by their
A. Names
B. Indexes
C. Any one of the above
D. None of the above
Answer : C
34. Default scripting language in ASP.
A. EcmaScript
B. VBScript
C. PERL
D. JavaScript
Answer : B
35. How can you check if the page is visited for the first time
A. Use PostBack
B. Use IsPostBack
C. Use Post
D. Use Get
Answer : B
36. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
37. HTML elements, HTML server controls and ASP.NET server controls can be used on the same form
A. True
B. False
C.
D.
Answer : A
38. The HTML control that helps to browse a file is
A. File
B. FileBrowser
C. Browser
D. Select
Answer : A
39. Choose the form in which Postback occur
A. HTMLForms
B. Webforms
C. Winforms
D. None of these
Answer : B
40. If a page name is WebForm1.aspx and it resides in ../Test/, then it will inherit from
A. WebForm1
B. WebForm1/Test
C. Test/WebForm1
D. Test.WebForm1
Answer : D
41. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
42. ___________ sets the time out period for a particular page in seconds
A. Session.Timeout
B. Server.ScriptTimeout
C. Response.Expires
D. Response.ExpiresAbsolute
Answer : B
43. For Adrotator control the XML file is mentioned through ________ property
A. File
B. Name
C. Advertisement File
D. Ad File
Answer : C
44. A DataSet can be generated from
A. Page and DataConnection Object
B. DataAdapter and Page Object
C. DataAdapter and DataConnection Object
D. All of the above
Answer : B
45. In case of RangeValidator, a TextBox's value can be compared to the values taken from two other TextBoxes
A. True
B. False
C.
D.
Answer : A
46. 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
Answer : B
47. ____________ converts virtual path to default path
A. Server.MapPath and Request.MapPath
B. Server.MapPath and Response.MapPath
C. Response.MapPath and Request.MapPath
D. All of the above
Answer : B
48. ____________ enables you to add, modify and delete records but you won't see the changes made by other users
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : B
49. Error handling can be done through Global.asax
A. True
B. False
C.
D.
Answer : A
50. In Global.asax there are _______ general methods
A. 5
B. 6
C. 7
D. 8
Answer : C

Sharing is caring