Hidden fields technique is widely used in ASP.NET programing. Hidden fields are html input control with hidden type that store hidden data in the html.
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
They are simple to implement.
2. As data is cached on client side they work with Web Farms.
3. All browsers support hidden field.
4. No server resources are required.
can be tampered creating a security hole.
2. Page performance decreases if you store large data, as the data are stored
3. `Hidden fields do not support rich structures as HTML hidden fields are only
single valued. Then you have to work around with delimiters etc to handle
Below is how you will actually implement
hidden field in a project
<asp:HiddenField ID="hiddenUserid" runat="server" />
cookie is a small bit of text that accompanies requests and pages as they go
between the Web server and browser.
No server resources are required as they are stored in client.
2. They are light weight and simple to use
Most browsers place a 4096-byte limit on the size of a cookie, although
support for 8192-byte cookies is becoming more common in the new browser
and client-device versions available today.
2. Some users disable their browser or client device’s ability to receive
3. Cookies can be tampered and thus creating a security hole.
4. Cookies can expire thus leading to inconsistency.
Below is sample code of
Request.Cookies.Add(New HttpCookie(“name”, “usrname”))
and limitations of using Query Strings
query string is information sent to the server appended to the end of a page
No server resources are required.
2. The query string containing in the HTTP requests for a specific
3. All browsers support query strings.
Query string data is directly visible to user thus leading to security
Most browsers and client devices impose a 255-character limit on URL length.
2. Below is a sample “name” and “lastName” query string passed in
&lastName=kendre . This query string data can then be requested later