Home

1000+ Asp Programming Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. Which of the following is not a member of ADODBCommand object?
A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Answer : C
2. 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
3. File extension used for ASP.NET files.
A. .Web
B. .ASP
C. .ASPX
D. None of the above
Answer : B
4. While accessing values submitted to a web form, __________ property of a control is used.
A. Value
B. Text
C. Item
D. Id
Answer : A
5. 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
6. 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
7. If a Table controls name is Table1, to access value from its second row, third column, __________________ can be used.
A. table1.rows(1).cells(2).text
B. table1.rows(2).cells(3).text
C. table1.rows(1).cells(2).value
D. table1.rows(2).cells(3).value
Answer : A
8. Of the following controls which can be used to add a control at runtime
A. Panel
B. Image
C. Label
D. All of the above
Answer : D
9. In ASP.NET if a file is saved, it is save only in the server machine.
A. True
B. False
C.
D.
Answer : A
10. Caching type supported by ASP.Net
A. Output Caching
B. DataCaching
C. a and b
D. none of the above
Answer : C
11. Error handling can be done through Global.asax
A. True
B. False
C.
D.
Answer : A
12. Can you use client-side event handler and server-side event handler for the same ASP.NET server control?
A. Yes
B. No
C.
D.
Answer : A
13. 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
14. ____________ 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
15. Web.config file is used...
A. Configures the time that the server-side codebehind module is called
B. To store the global information and variable definitions for the application
C. To configure the web server
D. To configure the web browser
Answer : B
16. 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
17. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
18. HTML tag equivalent to Panel is
A. Div
B. Br
C. P
D. Span
Answer : A
19. An error handling is Structured when we use
A. On Error GoTo
B. Try Catch
C. Both of the above
D. Any one of the above
Answer : B
20. ASP.NET use
A. Compiler
B. Interpreter
C.
D.
Answer : A
21. How do we create a FileSystemObject?
A. Server.CreateObject("Scripting.FileSystemObject")
B. Create("FileSystemObject")
C. Create Object:"Scripting.FileSystemObject"
D. Server.CreateObject("FileSystemObject")
Answer : A
22. ___________ controls how proxy servers temporarily store web pages
A. Expires
B. CacheControl
C. ExpiresAbsolute
D. None of the above
Answer : B
23. Default Session data is stored in ASP.Net.
A. StateServer
B. Session Object
C. InProcess
D. all of the above
Answer : C
24. Checkboxes have same name and different values while Radio Buttons have the reverse
A. True
B. False
C.
D.
Answer : B
25. CDONTS is designed on for Windows NT Server
A. True
B. False
C.
D.
Answer : A
26. To make an HTML control behave as a Server control, ___________ option must be set.
A. Server Control
B. Run As Server Control
C. Run As Web Control
D.
Answer : B
27. .FileInfo gives information about any file and .File gives information about a particular file
A. True
B. False
C.
D.
Answer : B
28. For Adrotator control the XML file is mentioned through ________ property
A. File
B. Name
C. Advertisement File
D. Ad File
Answer : C
29. __________ and __________ event are the two most commonly supported server-side events. (Click and Change)
A. Click and Change
B. Click and DblClick
C. KeyUp and KeyDown
D. KeyEnter and KeyPress
Answer : A
30. ASP.NET is object oriented
A. True
B. False
C.
D.
Answer : A
31. Anything appearing before ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : D
32. One difference between ASP.NET and ASP is that ASP is more structure than ASP.NET
A. True
B. False
C.
D.
Answer : B
33. You can specify a function name in
A. CustomValidator
B. RequiredFieldValidator
C. RangeValidator
D. ValidationSummary
Answer : A
34. Which of the following method must be overridden in a custom control?
A. The Paint() method
B. The Control_Build() method
C. The default constructor
D. The Render() method
Answer : D
35. In case of a CompareValidator, a TextBox's value can be compared to an expression
A. True
B. False
C.
D.
Answer : B
36. You need to modify an ASP.NET page to prevent the browser window from going blank after a postback and to maintain the correct control focus after events are processed. What should you do?
A. Add the following attribute to the HTML code for the controls that cause the postbacks:
RunAt="client"
B. Add the following attribute to the HTML code for the controls that cause the postbacks:
EnableViewState="True"
C. Add the following attribute to the Page directive for the aspx file:
SmartNavigation="True"
D. Add the following attribute to the OutputCache directive for the aspx file:
Location="client
Answer : C
37. ASP.NET uses _______ as the code behind
A. VB
B. VBScript
C. JavaScript
D. Jscript
Answer : A
38. RadioButtonsLists __________ property is used to add RadioButtons at runtime
A. Items
B. Collection
C. AddItem
D. None of the above
Answer : A
39. There can be more than one Global.asax file
A. True
B. False
C.
D.
Answer : B
40. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
41. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
42. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
43. Default scripting language in ASP.
A. EcmaScript
B. VBScript
C. PERL
D. JavaScript
Answer : B
44. To count how many users have logged in the web site till date use
A. Increment Session Variable in Session_Start event of Global.asax file
B. Increment Session Variable in Aplication_Start event of Global.asax file
C. Increment Application Variable in Session_Start event of Global.asax file
D. Increment Application Variable in Application_Start event of Global.asax file
Answer : C
45. ASP.NET can be installed on Windows 98 machine
A. True
B. False
C.
D.
Answer : B
46. To write a root tag say '<details>' through ASP.NET use
A. WriteElement
B. WriteStartElement
C. WriteElementString
D. WriteElementStart
Answer : B
47. ______________ creates a read-only recordset that can scroll forward only.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : A
48. This file stores your web configuration
A. Web.conf
B. Web.config
C. WebConfig.ini
D. WebConf.ini
Answer : B
49. To write an attribute for a tag through ASP.NET use
A. WriteAttribute
B. WriteStartAttribute
C. WriteAttributeString
D. WriteElementString
Answer : C
50. What keyword is necessary to expose a public function as a method of a Web Service?
A. WebSub()
B. WebFunction()
C. WebMethod()
D. WebClass
Answer : C

Sharing is caring