BCA602QB
BCA602QB
BCA602QB
6. 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
ANS: B
7. Attribute must be set on a validator control for the validation to work.
A. ControlToValidate
B. ControlToBind
C. ValidateControl
D. Validate
ANS: A
15. Which of the following ASP.NET object encapsulates the state of the client?
A. Session object
B. Application object
C. Response object
D. Server object
ANS: A
16. Which of the following control is used to validate that two fields are equal?
A. RegularExpressionValidator
B. CompareValidator
C. equals() method
D. RequiredFieldValidator
ANS : B
25. How many 'ScriptManager' control can be added on a ASP.NET web page?
A. Only One
B. More than One
C. Only Two
D. None of the above
ANS: A
26. What are the client-side state management options that ASP.NET supports?
A. Application
B. Session
C. Querystring
D. Option a and b are correct
ANS:C
27. By default, when you use Page Output Caching, at what location page is cached?
A. Only on web server
B. Only on Client
C. Web server, any proxy servers, and browser
D. All of the above.
ANS:C
33. Which of the following validation control is used to ensure that an user does not skip a
form entity field?
A. CompareValidator
B. RequiredFieldValidator
C. RangeValidator
D. RegularExpressionValidator
ANS : B
35. Validation control displays error messages using which of the following methods?
A. Inline
B. Summary
C. In place and summary
D. All of these above
ANS: D
37. Which of the following authentication is best suited for a corporate network?
A. Windows
B. Form
C. User
D. All
ANS: A
38. Which of the following object is used along with an application object in order to ensure
that only one process accesses a variable at a time?
A. Synchronize
B. Synchronize()
C. ThreadLock
D. Lock()
ANS : B
39. What attributes do you use to hide a public .Net class from COM?
A. DLLImport Attributes
B.ComVisible attributes
C. COM Interop
D. All
ANS : B
40. Where do we include the user lists for windows authentication?
A. < Credential>
B. < authorization>
C. < identity>
D. < authentiation>
ANS : B
43. ______________ element in the web.config file is used to run code using the permissions
of a specific user
A. < credential> element
B. < authentication> element
C. < authorization> element
D. < identity> element
ANS: D
44. 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
ANS : B
46. Two methods with the same name but with different parameters.
A. Overloading
B. Loading
C. Multiplexing
D. Duplexing
ANS: A
48. How many web.config files that can be there an ASP.NET application?
A. only one
B. only two
C. upto 10
D. one or more
ANS: D
52. If you want to add an array in ArrayList then which method of ArrayList will be used?
A. AddRange
B. Add
C. AddArray
D. None of the above
ANS: A
53. Feature of a local variable
A. It can be used anywhere in the program
B. It must accept a class
C. It must be declared within a method
D. It represent a class object
ANS:C
57. If you want to validate the email addresses, Social Security numbers, phone numbers,
and dates types of data, which validation control will be used?
A. RegularExpressionValidator
B. CompareValidator
C. RequiredFieldValidator
D. None of the above
ANS: A
ANS:C
ANS: D
60. Which validation control in ASP.NET can be used to determine if the data is entered into
a TextBox control is of type Currency?
A. ValidationSummary
B. CompareValidator
C. RequiredFieldValidator
D. None of the above.
ANS : B
61. There is a button on page name cancel and it should bypass validation when cancel
button is clicked. What will you do?
A. set CausesValidation = false
B. set RemoveValidation=true
C. set cancel=true
D. None of the above
ANS: A
62. Client-side validation is turned on by default. If you want that particular validation
control should not validate at client side, what will you do?
A. Set the EnableClientScript property to false
B. Set the validate property to false
C. Set the EnableClientScript property to true
D. Set the Page.Isvalid property to false
ANS: A
ANS: D
64. Which interface you will use wrap an AJAX client control into a custom server control?
A. IScriptManager
B. IScriptControl
C. IScriptAJAX
D. None of the above
ANS: A
65. Which method is used to dynamically register client script from code?
A. Page.ClientScript.RegisterClientScriptBlock
B. RegisterScript
C. Page.ClientScript
D. None of the above
ANS: A
66. Which control is required for every page that have AJAX Extensions for ASP.NET?
A. UpdatePanel
B. ScriptManager
C. ContentPanel
D. None of the above
ANS : B
67. A Master Page contains a ScriptManager control and a user wants the AJAX
functionality on content page then which control is necessary on content page?
A. AsyncPostBackTrigger
B. ScriptManager
C. ScriptManagerProxy
D. None of the above
ANS:C
68. Which control can be used to update only the portion of the page?
A. UpdatePanel
B. ScriptManager
C. AsyncPostBackTrigger
D. None of the above
ANS: A
69. What property and method of the Page object do you use to register client script
dynamically from code?
ANS:C
70. Which of the following is not an ASP.NET page event?
A. Init
B. Load
C. Import
D. None of the above
ANS:C
72. Using which type of stylesheet we can change the style of an element in the entire
website?
A. Internal Stylesheet
B. External Stylesheet
C. Inline stylesheet
D. None of these above
ANS : B
73. How do you create a TextBox for retrieving a password from a user?
A. Set TextMode property of the TextBox control to Secret.
B. Set Mode property of the TextBox control to Password.
C. Set Text property of the TextBox control to Password.
D. Set TextMode property of the TextBox control to Password.
ANS: D
74. You have to log the data into database if your session times out. Which event you will
use?
A. Session_End
B. Application_End
C. Application_Start
D. Application_SessionTimeout
ANS : B
75. If you are using Webparts in your web page then which control is necessary?
A. WebpartController
B. WebPartmanager
C. WebpartZone
D. None of the above
ANS : B
76 If any user has disabled cookies in their browsers, what can you do to
enable them to use forms authentication?
A. Set BoweserCookieEnabled=true;
B.Set cookieless=true;
C.Use the AutoDetect setting of the cookieless attribute.
D.None of the above.
Answer:C
77 What property and method of the Page object do you use to register
client script dynamically from code?
A. ScriptManager control is used to dynamically register client script from
code.
B.The Page.ClientScript.RegisterClientScriptBlock is used to dynamically
register client script from code.
C.ScriptManagerProxy control is used to dynamically register client script
from code.
D.None of the above.
Answer:C
79 What ASP.NET object encapsulates the state of the client and the
browser?
A. Application Object
B. Session Object
B.Response Object
D.Request Object
Answer: B
82 HTTP messages are typically sent between the Web server and Web
browser using which Port number?
A. 70
B.80
C.400
D.410
Answer:B
84 You want to make a configuration setting change that will affect only the
current Web application. Which file will you change?
A. Global.asax
B. Web.config in the root of the Web application
C.Machine.config
D.All of the above
Answer:B
86 Which protocol is used for requesting a web page in ASP.NET from the
Web Server?
A.HTTP
B.TCP
C.SMTP
D.None of the above.
Answer: A
87 ______________is the first method that is fired during the page load.
A. PreRender()
B. Load()
C. Unload()
D. Init()
Answer : D
88 In ASP.NET what are the different types of session mode available?
A. InProc
B. StateServer
C. SQLServer
D. All of the above
Answer:D
If you want to cache the page according to the browser, then what will
you do?
A.
Write the given below code in aspx page.
<%@ OutputCache Duration=”500” VaryByParam=”none”
VaryByCustom=”browser” %>
B.
Write the given below code in aspx page.
<%@ OutputCache Duration=”500” VaryByParam=”none”
VaryByHeader=”browser” %>
C.
Write the given below code in aspx page.
<%@ OutputCache Duration=”500” VaryByParam=” browser”
VaryByCustom=”none” %>
D. None of the above.
Answer: A
91 You need to allow users to choose their own themes. In which page event
will you write the user-selected theme?
A. Page_Load
B. Page_Render
C. Page_PreInit
D. Page_PreRender
Answer:C
92 What are the types of cookies?
A. Session cookies
B. Persistent cookies.
C. Dummy cookies.
D. Option A and B are correct.
Answer: D
102 If you want to validate the email addresses, Social Security numbers,
phone numbers, and dates types of data, which validation control will be
used?
A. RegularExpressionValidator
B. CompareValidator
C. RequiredFieldValidator
D. None of the above
Answer: A
103 The TreeView control can be specified directly in the control or bound
to _____.
A. .gif file
B. .doc file
C. WeB.sitemap file
D. .prg file
Answer: C
106 What are the client-side state management options that ASP.NET
supports?
A. Application
B. Session
C. Querystring
D. Option a and b are correct
Answer: C
107 When a User’s Session times out which event should you respond to?
A. Application_Start
B. Session_End
C. Session_Start
D. Application_End
Answer:B
108 If we want to add graphics using asp.net which of the following web
control will you use?
A. Link Button
B. AdRotator
C. Grid View
D. Layout
Answer:B
111 Which of the following is the default authentication mode for IIS?
A. Anonymous
B. Windows
C. Basic Authentication
D. None
Answer: A
115 You use the ASP.NET Web Site Administration Tool to configure
ASP.NET membership with forms authentication. What should you
name your login form so that you do not have to modify the WeB.config
file?
A. Login.aspx
B. LoginPage.aspx
C. Default.aspx
D. Auth.aspx
Answer: A
116 Which following control is used to display a single record from a data
source in a table in ASP.NET
A. GridView
B. Datalist
C. DetailsView
D. DataRelation
Answer: C
118 Which of these keywords are used for the block to handle the exceptions
generated by try block?
A.try
B. catch
C. throw
D. check
Answer:B
122
Range Validator control in ASP.NET supports which type?
A. Integer
B. String
C. Currency
D. All of the above
Answer: D
123
Which object works on client side in state management system?
A. ViewState
B. cookies
C. Query strings
D. All of the above
Answer: D
124 Which of the following keyword can be used to rethrow an exception in
C#:
A. return
B. throw
C. re-throw
D. create
Answer:B
129 What types of data can you store in the Cache collection?
A. Only String Type of Data
B. You can store any type of data in the Cache collection.
C. Only DataSet Object
D. All of the above.
Answer:B
132 You want to make a configuration setting change that will affect only the
current Web application. Which file will you change?
A. Global.asax
B. WeB.config in the root of the Web application
C. Machine.config
D. All of the above
Answer:B
133
How many 'ScriptManager' control can be added on a ASP.NET web
page?
A. Only One
B. More than One
C. Only Two
D. None of the above.
Answer: A
134 Which control is required of every AJAX page to manage the JavaScript
files sent to the client and the communication between client and server?
A. UpdatePanel
B. ScriptManager
C. AsyncPostBackTrigger
D. None of the above.
Answer:B
135
Which data control does not exist in asp.net
A. GridView
B. DataList
C. Repeater
D. tableView
Answer: D
136
Which namespace is used when we connect our asp.net page to sql server
A. System.data.sqlclient
B. System.data.sql
C. System.sqlserver
D. System.url
Answer: A
137 Which object can help you maintain data across users?
A. Application object
B. Session object
C. Response object
D. Server object
Answer: A
138 Which of the following is not the way to maintain state?
A. View state
B. Cookies
C. Hidden fields
D. Request object
Answer: D
139
Which of the following is NOT a valid DOT NET Exception class:
A.System.Exception
B. System.DivideByZeroException
C. System.OutOfMemoryException
D. System.StackMemoryException
Answer: D
140
Which SqlCommand execution returns the value of the first column of
the first row from a table?
A. ExecuteNonQuery
B. ExecuteReader
C. ExecuteXmlReader
D. ExecuteScalar
Answer: D
141 In ASP.NET the <authorization> section contain which of the following
elements?
A. < deny>
B. <allow>
C. Both a and b
D. None of the Above
Answer: C
142 Which of the following authentication is best suited for a corporate
network?
A. Windows
B. Form
B. User
D. All
Answer: A
143
What are the three main objects of DataSet?
A. DataTable, DataColumn, and type.
B. DataTable, DataRelation, and DataAdapter.
C. DataTable, DataColumn, and DataRelation.
D. DataReader,DataAdapter, and Command.
Answer: C
144
Which ADO.NET class provide Disconnected Environment?
A. DataReader
B. DataSet
C. Command
D. None of the above.
Answer:B
145
Windows-Based Authentication is well suited for.
A. Intranet environment.
B. Public web site.
C. Desktop application.
D. None of the above.
Answer: A
146
What is the fully qualified name of the base class of all server controls?
A. System.WeB.UI.Control
B. System.WeB.UI
C. System.Control
D. All of the above
Answer: A
147
Which web control is useful to display hierarchical data in a tree
structure? A. TreeView Control
B. UpdatePanel
C. AdRotator
D. Compare Validator
Answer: A
148
Which following specifies the style used for the display text for the
current node in sitemap path control?
A. NodeStyle
B. RootNodeStyle
C. CurrentNodeStyle
D. none of the above
Answer: C
149
Which is the first event of ASP.NET page, when user requests a web
page?
A. PreLoad
B. Load
C. Preinit
D. Init
Answer: C
150 Which following Specifies the style for the selected dates on the calendar
?
A. SelectedDayStyle
B. SelectorStyle
C. TodayDayStyle
D. WeekendDayStyle
Answer: A
172) In ASP.NET what are the different types of session mode available?
a. InProc
b. StateServer
c. SQLServer
d. All of the above
Ans : d
173) To kill a users session explicitly which of the following will you use?
a. Session.Close()
b. Session.End()
c. Session.Abondon()
d. Session.Discard()
Ans : c
174) Which control is required of every AJAX page to manage the JavaScript files
sent to the client and the communication between client and server?
a. UpdatePanel
b. ScriptManager
c. AsyncPostBackTrigger
d. None of the above.
Ans : b
175) From the following which is not a valid state management object?
a. Querystate
b. Cookies
c. Application state
d. Hidden form fields
Ans : a
179) Which attribute is necessary for HTML control to work as a HTML server
control?
a. runat=”server”
b. runat=”web-server”
c. ID=”server”
d. ID=”web-server”
Ans : a
180) Which control can be used to update only the portion of the page?
a. UpdatePanel
b. ScriptManager
c. AsyncPostBackTrigger
d. None of the above.
Ans : b
183) When a User’s Session times out which event should you respond to?
a. Application_Start
b. Session_End
c. Session_Start
d. Application_End
Ans : b
var nums =
from n in numbers
select n + 1;
a. 10, 11, 1, 12
b. 10, 11, 12, 13
c. 9, 10, 0, 11
d. None of these
Ans : a
193) Which SqlCommand execution returns the number of effected records in the
table?
a. ExecuteNonQuery
b. ExecuteReader
c. ExecuteXmlReader
d. ExecuteScalar
Ans : a