ASP.Net State Management Trivia Answers

Hi Friends,

Please refer the below answers for the Trivia questions

1. Correct Answer: B
A. Incorrect: Client-side state management requires the client to transmit the user name and
password with each request. It also requires the client to store the information locally,
where it might be compromised. This is not a secure solution.
B. Correct: Server-side state management provides better security for confidential information
by reducing the number of times the information is transmitted across the network.

2. Correct Answer: A
A. Correct: Client-side state management is an excellent choice for storing nonconfidential
information. It is much easier to implement than server-side state management when
multiple web servers are involved, and it minimizes load on the servers.
B. Incorrect: You could use server-side state management; however, it would require a
server-side database to synchronize information among multiple web servers. This
would increase the load on your servers.

3. Correct Answer: A
A. Correct: View state is the simplest way to store this information. Because it is enabled by
default, you might not need to write any code to support state management for your form.
B. Incorrect: You can use control state; however, it requires extra coding and is only necessary
if you are creating a control that might be used in a webpage that has view state disabled.
C. Incorrect: You can store the information in hidden fields; however, that requires writing
extra code. View state supports your requirements with little or no additional code.
D. Incorrect: Cookies require extra coding and are only required if you need to share
information between multiple web forms.
E. Incorrect: You can use query strings to store user preferences. However, you need to
update every link on the page that the user might click. This is very time consuming
to implement.

4. Correct Answer: D
A. Incorrect: View state can only store information for a single web form.
B. Incorrect: Control state can only store information for a single control.
C. Incorrect: Hidden fields can only store information for a single web form.
D. Correct: Unless you specifically narrow the scope, the user’s browser submits information
stored in a cookie to every page on your site. Therefore, each page processes the user
preference information. If you configure the cookie expiration to make it persistent, the
browser submits the cookie the next time the user visits your site.
E. Incorrect: You can use query strings to store user preferences. However, you need to
update every link on the page that the user might click. This is very time consuming
to implement.

5. Correct Answer: E
A. Incorrect: View state information is not stored in the URL, and therefore is lost if the URL
is bookmarked.
B. Incorrect: Control state information is not stored in the URL, and therefore is lost if
the URL is bookmarked.
C. Incorrect: Hidden fields are not stored in the URL, and therefore are lost if the URL is
bookmarked.
D. Incorrect: Cookies are not stored in the URL, and therefore are lost if the URL is bookmarked.
E. Correct: Query strings are stored in the URL. Although they are not the easiest type of
client-side state management to implement, they are the only technique that allows state
management data to be easily bookmarked and sent via email.

Thanks,
Rahul
Happy Coding

Thanks, Rahul Happy Coding