Home

Asp Programming 1000+ MCQ with answer for SSC JE

Thursday 9th of March 2023

Sharing is caring

1. 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
2. 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
3. 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
4. One difference between ASP.NET and ASP is that ASP is more structure than ASP.NET
A. True
B. False
C.
D.
Answer : B
5. 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
6. We can manage states in asp.net application using
A. Session Objects
B. Application Objects
C. Viewstate
D. All of the above
Answer : D
7. Anything appearing after ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : B
8. Default scripting language in ASP.
A. EcmaScript
B. VBScript
C. PERL
D. JavaScript
Answer : B
9. 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
10. ______________ creates a read-only recordset that can scroll forward only.
A. OpenForwardOnly
B. OpenKeyset
C. OpenDynamic
D. OpenStatic
Answer : A
11. In ___________ records are read-only and cannot be changed.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : A
12. Radio Button's have same name and different values while Checkboxes have the reverse
A. True
B. False
C.
D.
Answer : A
13. While redirecting, values can be passed with it
A. True
B. False
C.
D.
Answer : A
14. ASP.NET is object oriented
A. True
B. False
C.
D.
Answer : A
15. 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
16. 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
17. To save an XML file from ASP.NET use
A. Save
B. Update
C. SaveXML
D. UpdateXML
Answer : A
18. 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
19. There can be more than one Global.asax file
A. True
B. False
C.
D.
Answer : B
20. Anything appearing before ________ is cleared
A. Response.Flush
B. Response.End
C. Response.Buffer
D. Response.Clear
Answer : D
21. To pass queries to Crystal Reports use
A. SelectionFormula
B. Formula
C. Filter
D. None of the above
Answer : A
22. 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
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. ____________ 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
25. A _____________ is a logical naming scheme for grouping related types of
A. objects together.
B. class
C. namespace
D. interface
Answer : C
26. 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
27. 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
28. Cookies collection is present in
A. Response and Request
B. Request and Server
C. Response and Server
D. All of the above
Answer : A
29. A web server control is written as
A. <asp-TextBox ......
B. <asp TextBox ......
C. <aspTextBox ........
D. <asp:TextBox ........
Answer : D
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. ASP.NET if fully compatible with ASP
A. True
B. False
C.
D.
Answer : B
32. What is the default data type of a variable in ASP.NET?
A. Variant
B. Object
C. Integer
D. String
Answer : B
33. ___________ 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
34. 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
35. 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
36. Which DLL translate XML to SQL in IIS?
A. SQLISAPI.dll
B. SQLXML.dll
C. LISXML.dll
D. SQLIIS.dll
Answer : A
37. 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
38. For Adrotator control the XML file is mentioned through ________ property
A. File
B. Name
C. Advertisement File
D. Ad File
Answer : C
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. The first event triggers in an aspx page is.
A. Page_Init()
B. Page_Load()
C. Page_click()
D. None of these
Answer : A
41. Which of the following is not a member of ADODBCommand object?
A. ExecuteScalar
B. ExecuteStream
C. Open
D. ExecuteReader
Answer : C
42. 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
43. Menus can be added to an ASP.NET Page
A. True
B. False
C.
D.
Answer : B
44. This control does not produce an HTML output
A. Panel
B. Literal
C. PlaceHolder
D. DataList
Answer : C
45. You can send an e-mail with an attachment using only SmtpMail class
A. True
B. False
C.
D.
Answer : B
46. ASP.NET use
A. Compiler
B. Interpreter
C.
D.
Answer : A
47. 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
48. In ___________ records are locked when you start editing.
A. LockReadOnly
B. LockPessimistic
C. LockOptimistic
D. LockDynamic
Answer : B
49. In a DataSet if multible tables are used, they are identified by their
A. Names
B. Indexes
C. Any one of the above
D. None of the above
Answer : C
50. 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

Sharing is caring