Home

1000+ Asp Programming Multiple Choice Question Answer [Solved]

Thursday 9th of March 2023

Sharing is caring

1. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
2. CDONTS is designed on for Windows NT Server
A. True
B. False
C.
D.
Answer : A
3. In ___________ records are read-only and cannot be changed.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : A
4. ASP.NET is object oriented
A. True
B. False
C.
D.
Answer : A
5. What are unique properties of RangeValidator control?
A. Maximum value
B. Minimum value
C. Type
D. All of the above
Answer : D
6. ____________ 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
7. 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
8. This property is inapplicable in DropDownList
A. SelectionMode
B. Items
C. DataMember
D. None of the above
Answer : A
9. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
10. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
11. There can be more than one Global.asax file
A. True
B. False
C.
D.
Answer : B
12. Can you have more than one form declaration on a web form?
A. Yes
B. No
C.
D.
Answer : B
13. 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
14. What is the default data type of a variable in ASP.NET?
A. Variant
B. Object
C. Integer
D. String
Answer : B
15. ____________ 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
16. While accessing values submitted to a web form, __________ property of a control is used.
A. Value
B. Text
C. Item
D. Id
Answer : A
17. 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
18. 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
19. You can specify a function name in
A. CustomValidator
B. RequiredFieldValidator
C. RangeValidator
D. ValidationSummary
Answer : A
20. To make a RepeaterControl viewable, the controls ____________ must be edited
A. DataSource
B. DataMember
C. ItemTemplate
D. Template
Answer : D
21. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
22. 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
23. 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
24. The default method of a WebForm is
A. Page_Load
B. WebForm_Load
C. Form_Load
D. Page_Init
Answer : A
25. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
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. 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
29. 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
30. 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
31. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
32. 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
33. To write a root tag say '<details>' through ASP.NET use
A. WriteElement
B. WriteStartElement
C. WriteElementString
D. WriteElementStart
Answer : B
34. ____________ 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
35. ASP.NET use
A. Compiler
B. Interpreter
C.
D.
Answer : A
36. ___________ 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
37. We can manage states in asp.net application using
A. Session Objects
B. Application Objects
C. Viewstate
D. All of the above
Answer : D
38. 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
39. Attribute must be set on a validator control for the validation to work.
A. ControlToValidate
B. ControlToBind
C. ValidateControl
D. Validate
Answer : A
40. The HTML control that helps to browse a file is
A. File
B. FileBrowser
C. Browser
D. Select
Answer : A
41. Options available with SelectionMode are
A. Single
B. Single and Multiple
C. Single, Multiple and Extended
D. All of the above
Answer : B
42. CDO stands for _________________ .
A. Collaborative Database Object
B. Collaborative Data Object
C. Collaborative Distributed Object
D. Complete Data Object
Answer : B
43. ______________ creates a read-only recordset that can scroll in any direction.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : D
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. HTML tag equivalent to Panel is
A. Div
B. Br
C. P
D. Span
Answer : A
46. A web server control is written as
A. <asp-TextBox ......
B. <asp TextBox ......
C. <aspTextBox ........
D. <asp:TextBox ........
Answer : D
47. 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
48. ASP.NET uses _______ as the code behind
A. VB
B. VBScript
C. JavaScript
D. Jscript
Answer : A
49. 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
50. RadioButtonsLists __________ property is used to add RadioButtons at runtime
A. Items
B. Collection
C. AddItem
D. None of the above
Answer : A

Sharing is caring