ASP.NET Test Questions Set 3

1)   In order to prevent a browser from caching a page which of these xstatements should be written?

a. Response.Cache.SetNoStore();
b. Response.Cache.SetNoServerCaching();
c. Response.Cache.SetNoCaching();
d. None of these
Answer  Explanation 

ANSWER: Response.Cache.SetNoStore();

Explanation:
No explanation is available for this question!


2)   You need to programmatically configure page output caching. Which object would you use?

a. Request
b. Response
c. Application
d. Server
Answer  Explanation 

ANSWER: Response

Explanation:
The Response object have methods such as Response.Cache.SetExpires and Response.AddCacheDependency that enables you to configure page output caching programmatically.


3)   What are the Command Object Methods?

a. ExecuteNonQuery
b. ExecuteReader
c. ExecuteScalar
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
The common methods of command abject are as follows.

- ExecuteReader: This method works on select SQL query. It returns the DataReader object. Use DataReader read () method to retrieve the rows.

- ExecuteScalar: This method returns single value. Its return type is Object. If you call ExecuteScalar method with a SQL statement that returns rows of data, the query executes but returns only the first column of the first row returned by the query.

- ExecuteNonQuery: If you are using Insert, Update or Delete SQL statement then use this method. Its return type is Integer (The number of affected records).


4)   To perform asynchronous data access, what must be added to the connection string?

a. BeginExecute=true
b. MultiThreaded=true
c. MultipleActiveResultSets=true
d. Asynchronous=true
Answer  Explanation 

ANSWER: Asynchronous=true

Explanation:
No explanation is available for this question!


5)   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.
Answer  Explanation 

ANSWER: ScriptManagerProxy

Explanation:
No explanation is available for this question!


6)   Which of the following is not a member of ADODBCommand object?

a. ExecuteScalar
b. ExecuteStream
c. Open
d. ExecuteReader
Answer  Explanation 

ANSWER: Open

Explanation:
No explanation is available for this question!


7)   From the following which is not a valid state management object?

a. Querystate
b. Cookies
c. Application state
d. Hidden form fields
Answer  Explanation 

ANSWER: Querystate

Explanation:
We generally do not run queries in asp as they are slow. It is not a valid management tool to be used.


8)   Where do we include the user lists for Form authentication?

a. < credential>
b. < authorization>
c. < Identity>
d. < authentication>
Answer  Explanation 

ANSWER: < credential>

Explanation:
No explanation is available for this question!


9)   By default, a .Net web site is configured with which of the following authentication types?

a. Anonymous
b. Basic
c. Digest
d. Integrated Windows authentication
e. a and d
Answer  Explanation 

ANSWER: a and d

Explanation:
No explanation is available for this question!


10)   Validation events of server controls occur before the page is post back to the server.

a. True
b. False


Answer  Explanation 

ANSWER: True

Explanation:
No explanation is available for this question!


11)   _____________is a property common in every validation control.

a. ValidationExpression
b. InitialValue
c. ValueToCompare
d. ControlToCompare
e. ControlToValidate
Answer  Explanation 

ANSWER: ControlToValidate

Explanation:
No explanation is available for this question!


12)   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 above
Answer  Explanation 

ANSWER: External Stylesheet

Explanation:
No explanation is available for this question!


13)   Which of the following is the way to monitor the web application?

a. MMC Event viewers
b. Performance logs
c. Alerts Snap-ins
d. ALL
Answer  Explanation 

ANSWER: ALL

Explanation:
No explanation is available for this question!


14)   __________________ file apply settings to all ASP.NET applications

a. web.config
b. machine.config
c. global.asax file
d. application object
Answer  Explanation 

ANSWER: machine.config

Explanation:
No explanation is available for this question!


15)   Which type of processing model does asp.net stimulate?

a. Static
b. Linear
c. Bottom­ up
d. Event­-driven
Answer  Explanation 

ANSWER: Event­-driven

Explanation:
Event-­driven programs respond to events. An event happens(or is raised) when something happens like when a button is pressed or something. Often, events are generated by user actions but there are some events which are system generated also.