Home

Asp Programming MCQ Solved Paper for SSC MTS

Thursday 9th of March 2023

Sharing is caring

1. 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
2. .FileInfo gives information about any file and .File gives information about a particular file
A. True
B. False
C.
D.
Answer : B
3. The HTML control that helps to browse a file is
A. File
B. FileBrowser
C. Browser
D. Select
Answer : A
4. In Global.asax there are _______ general methods
A. 5
B. 6
C. 7
D. 8
Answer : C
5. _________ is used to write/read into a leaf node
A. Value
B. InnerText
C. Text
D. InnerValue
Answer : B
6. You can send an e-mail with an attachment using only SmtpMail class
A. True
B. False
C.
D.
Answer : B
7. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
8. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
9. RadioButtonsLists __________ property is used to add RadioButtons at runtime
A. Items
B. Collection
C. AddItem
D. None of the above
Answer : A
10. ASP.NET is object oriented
A. True
B. False
C.
D.
Answer : A
11. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
12. The first event triggers in an aspx page is.
A. Page_Init()
B. Page_Load()
C. Page_click()
D. None of these
Answer : A
13. 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
14. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
15. Choose the form in which Postback occur
A. HTMLForms
B. Webforms
C. Winforms
D. None of these
Answer : B
16. To open Microsoft Word from ASP.NET page use
A. Response.Content
B. Response.ContentType
C. Request.Content
D. Request.ContentType
Answer : B
17. To write an attribute for a tag through ASP.NET use
A. WriteAttribute
B. WriteStartAttribute
C. WriteAttributeString
D. WriteElementString
Answer : C
18. Can you have more than one form declaration on a web form?
A. Yes
B. No
C.
D.
Answer : B
19. In ___________ records are locked when you start editing.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : B
20. 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
21. File extension used for ASP.NET files.
A. .Web
B. .ASP
C. .ASPX
D. None of the above
Answer : B
22. To display HTML tags as it is use
A. Encode
B. HTMLEncode
C. URLEncode
D. EncodeHTML
Answer : B
23. In case of a CompareValidator, a TextBox's value can be compared to an expression
A. True
B. False
C.
D.
Answer : B
24. 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
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. 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
27. 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
28. While accessing values submitted to a web form, __________ property of a control is used.
A. Value
B. Text
C. Item
D. Id
Answer : A
29. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
30. 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
31. ____________ 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
32. To make a RepeaterControl viewable, the controls ____________ must be edited
A. DataSource
B. DataMember
C. ItemTemplate
D. Template
Answer : D
33. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
34. Anything appearing before ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : D
35. Can you use client-side event handler and server-side event handler for the same ASP.NET server control?
A. Yes
B. No
C.
D.
Answer : A
36. 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
37. What is the default data type of a variable in ASP.NET?
A. Variant
B. Object
C. Integer
D. String
Answer : B
38. Anything appearing after ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : B
39. What class does a Web Service Inherit?
A. System.Web.Services
B. System.Web
C. System.Services
D. System.Web.Page
Answer : A
40. You can specify a function name in
A. CustomValidator
B. RequiredFieldValidator
C. RangeValidator
D. ValidationSummary
Answer : A
41. 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
42. How do we create a FileSystemObject?
A. Server.CreateObject("Scripting.FileSystemObject")
B. Create("FileSystemObject")
C. Create Object:"Scripting.FileSystemObject"
D. Server.CreateObject("FileSystemObject")
Answer : A
43. ASP.NET use
A. Compiler
B. Interpreter
C.
D.
Answer : A
44. For Adrotator control the XML file is mentioned through ________ property
A. File
B. Name
C. Advertisement File
D. Ad File
Answer : C
45. 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
46. 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
47. In the Adrotator XML file ________ is used to mention the file to link to
A. <ImageUrl>
B. <NavigateUrl>
C. <Url>
D. <Link>
Answer : B
48. An error handling is Structured when we use
A. On Error GoTo
B. Try Catch
C. Both of the above
D. Any one of the above
Answer : B
49. CDONTS is designed on for Windows NT Server
A. True
B. False
C.
D.
Answer : A
50. Menus can be added to an ASP.NET Page
A. True
B. False
C.
D.
Answer : B

Sharing is caring