Home

1000+ Asp Programming Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. __________.CreateObject("ADODB.Connection") creates a new connection.
A. Session
B. Request
C. Response
D. Server
Answer : D
2. To pass queries to Crystal Reports use
A. SelectionFormula
B. Formula
C. Filter
D. None of the above
Answer : A
3. 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
4. Default path for any web application is
A. .\Inetpub\Folder_name
B. .\Inetpub\www\Folder_name
C. .\Inetpub\wwwroot\Folder_name
D. .\Inetpub\mailroot\Folder_name
Answer : C
5. 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
6. This tag in Repeater control is mandatory
A. AlternateTemplate
B. ItemTemplate
C. SeperatorTemplate
D. FooterTemplate
Answer : B
7. Default scripting language in ASP.
A. EcmaScript
B. VBScript
C. PERL
D. JavaScript
Answer : B
8. 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
9. Checkboxes have same name and different values while Radio Buttons have the reverse
A. True
B. False
C.
D.
Answer : B
10. You can specify a function name in
A. CustomValidator
B. RequiredFieldValidator
C. RangeValidator
D. ValidationSummary
Answer : A
11. To open Microsoft Word from ASP.NET page use
A. Response.Content
B. Response.ContentType
C. Request.Content
D. Request.ContentType
Answer : B
12. We can write an XML document from ASP.NET without mentioning the encoding format ie even without specifying 'Nothing'
A. True
B. False
C.
D.
Answer : B
13. For Adrotator control the XML file is mentioned through ________ property
A. File
B. Name
C. Advertisement File
D. Ad File
Answer : C
14. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
15. RadioButtonsLists __________ property is used to add RadioButtons at runtime
A. Items
B. Collection
C. AddItem
D. None of the above
Answer : A
16. What class does a Web Service Inherit?
A. System.Web.Services
B. System.Web
C. System.Services
D. System.Web.Page
Answer : A
17. To write an attribute for a tag through ASP.NET use
A. WriteAttribute
B. WriteStartAttribute
C. WriteAttributeString
D. WriteElementString
Answer : C
18. In ___________ records are read-only and cannot be changed.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : A
19. 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
20. 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
21. ____________ 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
22. A _____________ is a logical naming scheme for grouping related types of
A. objects together.
B. class
C. namespace
D. interface
Answer : C
23. 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
24. You want to ensure that the user ID is saved between requests when the user is moving through pages. What will you do?
A. Use Session variables
B. Use Application variables
C. Any one of the above
D. No of the above
Answer : A
25. 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
26. 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
27. To write a root tag say '<details>' through ASP.NET use
A. WriteElement
B. WriteStartElement
C. WriteElementString
D. WriteElementStart
Answer : B
28. If passwords are to be sent from one page to another, we can use
A. Get method
B. Post method
C. Session variables
D. Any one of the above
Answer : D
29. CDONTS is designed on for Windows NT Server
A. True
B. False
C.
D.
Answer : A
30. 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
31. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
32. To send attachments using SMTP use
A. MailAttachment and MailMessage
B. CDO
C. Any one of the above
D. None of the above
Answer : A
33. Which DLL translate XML to SQL in IIS?
A. SQLISAPI.dll
B. SQLXML.dll
C. LISXML.dll
D. SQLIIS.dll
Answer : A
34. To read an XML file from ASP.NET use
A. XMLTextReader
B. XMLReader
C. XML.Reader
D. ReadXML
Answer : A
35. In ASP.NET if a file is saved, it is save only in the server machine.
A. True
B. False
C.
D.
Answer : A
36. In the Adrotator XML file ________ is used to mention the file to link to
A. <ImageUrl>
B. <NavigateUrl>
C. <Url>
D. <Link>
Answer : B
37. 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
38. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
39. An alternative way of displaying text on web page using
A. asp:label
B. asp:listitem
C. asp:button
D. None of these
Answer : A
40. In Global.asax there are _______ general methods
A. 5
B. 6
C. 7
D. 8
Answer : C
41. ASP.NET uses _______ as the code behind
A. VB
B. VBScript
C. JavaScript
D. Jscript
Answer : A
42. While accessing values submitted to a web form, __________ property of a control is used.
A. Value
B. Text
C. Item
D. Id
Answer : A
43. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
44. What is used to validate complex string patterns like an e-mail address?
A. Extended expressions
B. Basic expressions
C. Regular expressions
D. Irregular expressions
Answer : C
45. Which of the following object is not an ASP component?
A. LinkCounter
B. Counter
C. AdRotator
D. File Access
Answer : A
46. Error handling can be done through Global.asax
A. True
B. False
C.
D.
Answer : A
47. What is the default data type of a variable in ASP.NET?
A. Variant
B. Object
C. Integer
D. String
Answer : B
48. _________ is used to write/read into a leaf node
A. Value
B. InnerText
C. Text
D. InnerValue
Answer : B
49. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
50. In ASP.NET, the default method of a form is
A. Get
B. Post
C.
D.
Answer : B

Sharing is caring