Home

Asp Programming 1000+ MCQ with answer for IBPS Clerk

Thursday 9th of March 2023

Sharing is caring

1. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
2. ASP.NET uses _______ as the code behind
A. VB
B. VBScript
C. JavaScript
D. Jscript
Answer : A
3. 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
4. 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
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. To open Microsoft Word from ASP.NET page use
A. Response.Content
B. Response.ContentType
C. Request.Content
D. Request.ContentType
Answer : B
7. Default event handler for Link Label is
A. LinkClicked
B. Clicked
C. LinkActivated
D. ActiveLinkClicked
Answer : A
8. 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
9. ____________ 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
10. 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
11. ASP.NET can be installed on Windows 98 machine
A. True
B. False
C.
D.
Answer : B
12. 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
13. ASP.NET use
A. Compiler
B. Interpreter
C.
D.
Answer : A
14. ______________ creates a read-only recordset that can scroll forward only.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : A
15. ______________ creates a read-only recordset that can scroll in any direction.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : D
16. Which of the following is not a member of ADODBCommand object?
A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Answer : C
17. 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
18. 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
19. This property is inapplicable in DropDownList
A. SelectionMode
B. Items
C. DataMember
D. None of the above
Answer : A
20. _________ object represents all information sent form a browser to a server
A. Response
B. Request
C. Session
D. Application
Answer : B
21. A ValidationSummary control is bound to a control
A. True
B. False
C.
D.
Answer : B
22. What is the default data type of a variable in ASP.NET?
A. Variant
B. Object
C. Integer
D. String
Answer : B
23. An alternative way of displaying text on web page using
A. asp:label
B. asp:listitem
C. asp:button
D. None of these
Answer : A
24. _________ is used to write/read into a leaf node
A. Value
B. InnerText
C. Text
D. InnerValue
Answer : B
25. 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
26. The HTML control that helps to browse a file is
A. File
B. FileBrowser
C. Browser
D. Select
Answer : A
27. 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
28. Attribute must be set on a validator control for the validation to work.
A. ControlToValidate
B. ControlToBind
C. ValidateControl
D. Validate
Answer : A
29. 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
30. ___________ 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
31. This file stores your web configuration
A. Web.conf
B. Web.config
C. WebConfig.ini
D. WebConf.ini
Answer : B
32. 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
33. Choose the form in which Postback occur
A. HTMLForms
B. Webforms
C. Winforms
D. None of these
Answer : B
34. To display HTML tags as it is use
A. Encode
B. HTMLEncode
C. URLEncode
D. EncodeHTML
Answer : B
35. ___________ controls how proxy servers temporarily store web pages
A. Expires
B. CacheControl
C. ExpiresAbsolute
D. None of the above
Answer : B
36. Which DLL translate XML to SQL in IIS?
A. SQLISAPI.dll
B. SQLXML.dll
C. LISXML.dll
D. SQLIIS.dll
Answer : A
37. __________.CreateObject("ADODB.Connection") creates a new connection.
A. Session
B. Request
C. Response
D. Server
Answer : D
38. What class does a Web Service Inherit?
A. System.Web.Services
B. System.Web
C. System.Services
D. System.Web.Page
Answer : A
39. To write a root tag say '<details>' through ASP.NET use
A. WriteElement
B. WriteStartElement
C. WriteElementString
D. WriteElementStart
Answer : B
40. 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
41. In case of a CompareValidator, a TextBox's value can be compared to an expression
A. True
B. False
C.
D.
Answer : B
42. .FileInfo gives information about any file and .File gives information about a particular file
A. True
B. False
C.
D.
Answer : B
43. 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
44. 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
45. Anything appearing before ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : D
46. In the Adrotator XML file ________ is used to mention the file to link to
A. <ImageUrl>
B. <NavigateUrl>
C. <Url>
D. <Link>
Answer : B
47. 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
48. _________ object represents all information sent form a server to a browser
A. Response
B. Request
C. Session
D. Application
Answer : A
49. 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
50. To write an attribute for a tag through ASP.NET use
A. WriteAttribute
B. WriteStartAttribute
C. WriteAttributeString
D. WriteElementString
Answer : C

Sharing is caring