Home

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

Thursday 9th of March 2023

Sharing is caring

1. ASP.NET supports all data types that VB.NET supports
A. True
B. False
C.
D.
Answer : A
2. 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
3. This file stores your web configuration
A. Web.conf
B. Web.config
C. WebConfig.ini
D. WebConf.ini
Answer : B
4. This control does not produce an HTML output
A. Panel
B. Literal
C. PlaceHolder
D. DataList
Answer : C
5. 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
6. What are unique properties of RangeValidator control?
A. Maximum value
B. Minimum value
C. Type
D. All of the above
Answer : D
7. You can send an e-mail with an attachment using only SmtpMail class
A. True
B. False
C.
D.
Answer : B
8. To save an XML file from ASP.NET use
A. Save
B. Update
C. SaveXML
D. UpdateXML
Answer : A
9. 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
10. ____________ enables you to add, modify and delete records but you won't see the changes made by other users
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : B
11. 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
12. .DirectoryInfo gives information about any Directory
A. True
B. False
C.
D.
Answer : B
13. Options available with SelectionMode are
A. Single
B. Single and Multiple
C. Single, Multiple and Extended
D. All of the above
Answer : B
14. How do you get information from a form that is submitted using the "post" method?
A. Request.QueryString
B. Request.Form
C. Response.write
D. Response.writeln
Answer : B
15. File extension used for ASP.NET files.
A. .Web
B. .ASP
C. .ASPX
D. None of the above
Answer : B
16. 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
17. 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
18. Which DLL translate XML to SQL in IIS?
A. SQLISAPI.dll
B. SQLXML.dll
C. LISXML.dll
D. SQLIIS.dll
Answer : A
19. Which of the following object is not an ASP component?
A. LinkCounter
B. Counter
C. AdRotator
D. File Access
Answer : A
20. Anything appearing before ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : D
21. 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
22. One difference between ASP.NET and ASP is that ASP is more structure than ASP.NET
A. True
B. False
C.
D.
Answer : B
23. We can manage states in asp.net application using
A. Session Objects
B. Application Objects
C. Viewstate
D. All of the above
Answer : D
24. Cookies can be created with mentioning the expiry date
True

A.
B. False
C.
D.
Answer : B
25. 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
26. 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
27. This tag in Repeater control is mandatory
A. AlternateTemplate
B. ItemTemplate
C. SeperatorTemplate
D. FooterTemplate
Answer : B
28. Can you have more than one form declaration on a web form?
A. Yes
B. No
C.
D.
Answer : B
29. ____________ 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
30. A _____________ is a logical naming scheme for grouping related types of
A. objects together.
B. class
C. namespace
D. interface
Answer : C
31. 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
32. ASP.NET is object oriented
A. True
B. False
C.
D.
Answer : A
33. 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
34. Default event handler for Link Label is
A. LinkClicked
B. Clicked
C. LinkActivated
D. ActiveLinkClicked
Answer : A
35. 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
36. __________ 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
37. 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
38. 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
39. 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
40. Radio Button's have same name and different values while Checkboxes have the reverse
A. True
B. False
C.
D.
Answer : A
41. HTML tag equivalent to Panel is
A. Div
B. Br
C. P
D. Span
Answer : A
42. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
43. Which of the following is not a member of ADODBCommand object?
A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Answer : C
44. 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
45. 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
46. Anything appearing after ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : B
47. __________.CreateObject("ADODB.Connection") creates a new connection.
A. Session
B. Request
C. Response
D. Server
Answer : D
48. 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
49. ____________ 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
50. The HTML control that helps to browse a file is
A. File
B. FileBrowser
C. Browser
D. Select
Answer : A

Sharing is caring