Home

GRE - Asp Programming 1000+ MCQ [Solved] PDF Download

Thursday 9th of March 2023

Sharing is caring

1. 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
2. Anything appearing after ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : B
3. 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
4. What is the default data type of a variable in ASP.NET?
A. Variant
B. Object
C. Integer
D. String
Answer : B
5. File extension used for ASP.NET files.
A. .Web
B. .ASP
C. .ASPX
D. None of the above
Answer : B
6. 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
7. 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
8. 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
9. Options available with SelectionMode are
A. Single
B. Single and Multiple
C. Single, Multiple and Extended
D. All 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. 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
12. 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
13. 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
14. 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
15. The first event triggers in an aspx page is.
A. Page_Init()
B. Page_Load()
C. Page_click()
D. None of these
Answer : A
16. What are unique properties of RangeValidator control?
A. Maximum value
B. Minimum value
C. Type
D. All of the above
Answer : D
17. ASP.NET use
A. Compiler
B. Interpreter
C.
D.
Answer : A
18. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
19. To pass queries to Crystal Reports use
A. SelectionFormula
B. Formula
C. Filter
D. None of the above
Answer : A
20. The default method of a WebForm is
A. Page_Load
B. WebForm_Load
C. Form_Load
D. Page_Init
Answer : A
21. ___________ 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
22. Default scripting language in ASP.
A. EcmaScript
B. VBScript
C. PERL
D. JavaScript
Answer : B
23. ____________ 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
24. 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
25. 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
26. 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
27. _________ is used to write/read into a leaf node
A. Value
B. InnerText
C. Text
D. InnerValue
Answer : B
28. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
29. 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
30. In the Adrotator XML file ________ is used to mention the file to link to
A. <ImageUrl>
B. <NavigateUrl>
C. <Url>
D. <Link>
Answer : B
31. In ASP.NET if a file is saved, it is save only in the server machine.
A. True
B. False
C.
D.
Answer : A
32. 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
33. ____________ 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
34. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
35. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
36. ASP.NET supports all data types that VB.NET supports
A. True
B. False
C.
D.
Answer : A
37. To read an XML file from ASP.NET use
A. XMLTextReader
B. XMLReader
C. XML.Reader
D. ReadXML
Answer : A
38. __________ 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
39. You can specify a function name in
A. CustomValidator
B. RequiredFieldValidator
C. RangeValidator
D. ValidationSummary
Answer : A
40. Default Session data is stored in ASP.Net.
A. StateServer
B. Session Object
C. InProcess
D. all of the above
Answer : C
41. RadioButtonsLists __________ property is used to add RadioButtons at runtime
A. Items
B. Collection
C. AddItem
D. None of the above
Answer : A
42. 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
43. You have an image that is clickable and you want a pop-up window to display text that identifies the action that will be taken if the user clicks the image. What will you do?
A. For each image, set the AlternateText property to specify the text you want to display, and set the ToolTip property to True.
B. For each image, set the ToolTip property to specify the text you want to display.
C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent() method of the System.Web.UI.WebControls.Image class.
D. In the onmouseover event handler for each image, add code that calls the ToString() method of the System.Web.UI.WebControls.Image class.
Answer : B
44. This tag in Repeater control is mandatory
A. AlternateTemplate
B. ItemTemplate
C. SeperatorTemplate
D. FooterTemplate
Answer : B
45. ______________ creates a read-only recordset that can scroll forward only.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : A
46. You can send an e-mail with an attachment using only SmtpMail class
A. True
B. False
C.
D.
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. This property is inapplicable in DropDownList
A. SelectionMode
B. Items
C. DataMember
D. None of the above
Answer : A
49. In ___________ records are read-only and cannot be changed.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : A
50. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A

Sharing is caring