Home

1000+ Asp Programming MCQ for FCI Recruitment [Solved]

Thursday 9th of March 2023

Sharing is caring

1. One difference between ASP.NET and ASP is that ASP is more structure than ASP.NET
A. True
B. False
C.
D.
Answer : B
2. 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
3. In ASP.NET if a file is saved, it is save only in the server machine.
A. True
B. False
C.
D.
Answer : A
4. 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
5. 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
6. While accessing values submitted to a web form, __________ property of a control is used.
A. Value
B. Text
C. Item
D. Id
Answer : A
7. Choose the form in which Postback occur
A. HTMLForms
B. Webforms
C. Winforms
D. None of these
Answer : B
8. Menus can be added to an ASP.NET Page
A. True
B. False
C.
D.
Answer : B
9. 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
10. 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
11. ____________ 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
12. In ASP.NET, the default method of a form is
A. Get
B. Post
C.
D.
Answer : B
13. ______________ creates a read-only recordset that can scroll forward only.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : A
14. This property is inapplicable in DropDownList
A. SelectionMode
B. Items
C. DataMember
D. None of the above
Answer : A
15. 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
16. ___________ controls how proxy servers temporarily store web pages
A. Expires
B. CacheControl
C. ExpiresAbsolute
D. None of the above
Answer : B
17. You can send an e-mail with an attachment using only SmtpMail class
A. True
B. False
C.
D.
Answer : B
18. Which of the following is not a member of ADODBCommand object?
A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Answer : C
19. ASP.NET supports all data types that VB.NET supports
A. True
B. False
C.
D.
Answer : A
20. 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
21. This file stores your web configuration
A. Web.conf
B. Web.config
C. WebConfig.ini
D. WebConf.ini
Answer : B
22. There can be more than one Global.asax file
A. True
B. False
C.
D.
Answer : B
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. To display HTML tags as it is use
A. Encode
B. HTMLEncode
C. URLEncode
D. EncodeHTML
Answer : B
25. To save an XML file from ASP.NET use
A. Save
B. Update
C. SaveXML
D. UpdateXML
Answer : A
26. Which of the following object is not an ASP component?
A. LinkCounter
B. Counter
C. AdRotator
D. File Access
Answer : A
27. ASP.NET uses _______ as the code behind
A. VB
B. VBScript
C. JavaScript
D. Jscript
Answer : A
28. 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
29. 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
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. 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
32. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
33. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
34. To write an attribute for a tag through ASP.NET use
A. WriteAttribute
B. WriteStartAttribute
C. WriteAttributeString
D. WriteElementString
Answer : C
35. We can manage states in asp.net application using
A. Session Objects
B. Application Objects
C. Viewstate
D. All of the above
Answer : D
36. ASP.NET is object oriented
A. True
B. False
C.
D.
Answer : A
37. Radio Button's have same name and different values while Checkboxes have the reverse
A. True
B. False
C.
D.
Answer : A
38. 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
39. ___________ 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
40. 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
41. 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
42. The code file for WebForm1.aspx will be ___________
A. WebForm1.vbp
B. WebForm1.vb
C. WebForm1.frm
D. WebForm1.sln
Answer : B
43. ____________ 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
44. 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
45. 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
46. 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
47. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
48. Default Session data is stored in ASP.Net.
A. StateServer
B. Session Object
C. InProcess
D. all of the above
Answer : C
49. 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
50. 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

Sharing is caring