Software job search
.net sql interview questions
  The best place for technical interview questions
free matrimony
Home.netSql serverAsp.netC#Vb.netAdo.netAjaxMcpd dumpsWord count tool
Question. What are benefits and limitation of using hidden fields

Advantages of using hidden fields are:

No server resources are required - The hidden field is stored and read from the page.

Widespread support- Almost all browsers and client devices support forms with hidden fields.

Simple implementation - Hidden fields are standard HTML controls that require no complex programming logic.

Disadvantages of using hidden fields are:

Potential security risks- The hidden field can be tampered with. The information in the hidden field can be seen if the page output source is viewed directly, creating a potential security issue. You can manually encrypt and decrypt the contents of a hidden field, but doing so requires extra coding and overhead. If security is a concern, consider using a server-based state mechanism so that no sensitive information is sent to the client. For more information, see ASP.NET Web Application Security and Basic Security Practices for Web Applications.

Simple storage architecture- The hidden field does not support rich data types. Hidden fields offer a single string value field in which to place information. To store multiple values, you must implement delimited strings and the code to parse those strings. You can manually serialize and de-serialize rich data types to and from hidden fields, respectively. However, it requires extra code to do so. If you need to store rich data types on the client, consider using view state instead. View state has serialization built-in, and it stores data in hidden fields.

Performance considerations- Because hidden fields are stored in the page itself, storing large values can cause the page to slow down when users display it and when they post it.

Storage limitations- If the amount of data in a hidden field becomes very large, some proxies and firewalls will prevent access to the page that contains them. Because the maximum amount can vary with different firewall and proxy implementations, large hidden fields can be sporadically problematic. If you need to store many items of data, consider doing one of the following:

Put each item in a separate hidden field.

Use view state with view-state chunking turned on, which automatically separates data into multiple hidden fields.

Instead of storing data on the client, persist the data on the server. The more data you send to the client, the slower the apparent response time of your application will be because the browser will need to download or send more data.

a. Easy to implement
b. Hidden fields are supported by all browsers
c. Enables faster access of information because data is stored on client side

a. Not secure because the data is stored on Client side.
b. Decreases page performance if too many hidden fields
c. Only support single value.

 Rate this answer
 51 votes , average 5 out of 5

Back to interview questions
This question has been viewed 7355 times   

Other questions on interview questions

More Asp.Net interview questions
Asp.Net interview questions

Reader's opinions -

yyhth says

.net interview questions interview questions
C# interview questions interview questions interview questions
Ajax interview questions
Wcf interview questions
Wpf interview questions
.net threading interview questions
.net remoting and webservices interview questions
.net caching interview questions
.net oops interview questions
Sharepoint interview questions
Jquery interview questions
Silverlight interview questions
Linq interview questions
Wwf interview questions
Java interview questions
Sql server interview questions
Ssis interview questions
Ssrs interview questions
Data warehousing interview questions
Data mining interview questions
Oracle interview questions
Php interview questions
Design patterns interview questions
Uml interview questions
Mcpd dumps
Pmp practice tests

This site is best viewed with Internet Explorer 7.0 or higher, Firefox 2.0 or higher, Chrome at a minimum screen resolution of 1024x768.
A complete solution to interview questions
free matrimonial website      
Support Wikipedia