Home

1000+ Asp Programming MCQ for XAT [Solved]

Thursday 9th of March 2023

Sharing is caring

1. To open Microsoft Word from ASP.NET page use
A. Response.Content
B. Response.ContentType
C. Request.Content
D. Request.ContentType
Answer : B
2. Anything appearing after ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : B
3. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
4. The default method of a WebForm is
A. Page_Load
B. WebForm_Load
C. Form_Load
D. Page_Init
Answer : A
5. To display HTML tags as it is use
A. Encode
B. HTMLEncode
C. URLEncode
D. EncodeHTML
Answer : B
6. RadioButtonsLists __________ property is used to add RadioButtons at runtime
A. Items
B. Collection
C. AddItem
D. None of the above
Answer : A
7. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
8. ______________ creates a read-only recordset that can scroll in any direction.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : D
9. ASP.NET if fully compatible with ASP
A. True
B. False
C.
D.
Answer : B
10. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
11. What are unique properties of RangeValidator control?
A. Maximum value
B. Minimum value
C. Type
D. All of the above
Answer : D
12. A _____________ is a logical naming scheme for grouping related types of
A. objects together.
B. class
C. namespace
D. interface
Answer : C
13. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
14. Default scripting language in ASP.
A. EcmaScript
B. VBScript
C. PERL
D. JavaScript
Answer : B
15. 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
16. 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
17. In case of a CompareValidator, a TextBox's value can be compared to an expression
A. True
B. False
C.
D.
Answer : B
18. 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
19. For Adrotator control the XML file is mentioned through ________ property
A. File
B. Name
C. Advertisement File
D. Ad File
Answer : C
20. 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
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. ASP.NET supports all data types that VB.NET supports
A. True
B. False
C.
D.
Answer : A
23. _________ is used to write/read into a leaf node
A. Value
B. InnerText
C. Text
D. InnerValue
Answer : B
24. File extension used for ASP.NET files.
A. .Web
B. .ASP
C. .ASPX
D. None of the above
Answer : B
25. ____________ 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
26. 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
27. Anything appearing before ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : D
28. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
29. ____________ enables you to set a particular date when a page should no longer be cached by a browser or proxy server
A. Response.Expires
B. Session.Timeout
C. Response.ExpiresAbsolute
D. Response.CacheControl
Answer : C
30. This control does not produce an HTML output
A. Panel
B. Literal
C. PlaceHolder
D. DataList
Answer : C
31. This tag in Repeater control is mandatory
A. AlternateTemplate
B. ItemTemplate
C. SeperatorTemplate
D. FooterTemplate
Answer : B
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. Checkboxes have same name and different values while Radio Buttons have the reverse
A. True
B. False
C.
D.
Answer : B
34. 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
35. You can send an e-mail with an attachment using only SmtpMail class
A. True
B. False
C.
D.
Answer : B
36. Radio Button's have same name and different values while Checkboxes have the reverse
A. True
B. False
C.
D.
Answer : A
37. Which of the following is not a member of ADODBCommand object?
A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Answer : C
38. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
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. 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
41. 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
42. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
43. ___________ controls how proxy servers temporarily store web pages
A. Expires
B. CacheControl
C. ExpiresAbsolute
D. None of the above
Answer : B
44. 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
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. CDONTS is designed on for Windows NT Server
A. True
B. False
C.
D.
Answer : A
47. In ___________ records are locked when you start editing.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : B
48. ______________ creates a read-only recordset that can scroll forward only.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : A
49. Menus can be added to an ASP.NET Page
A. True
B. False
C.
D.
Answer : B
50. To save an XML file from ASP.NET use
A. Save
B. Update
C. SaveXML
D. UpdateXML
Answer : A

Sharing is caring