Tag Archives: SynapseIndia Employee Cases

Advantages and Disadvantages of HiddenFields in ASP.NET

You can store page-specific information in a hidden field on your page as a way of maintaining the state of your page.If you use hidden fields, it is best to store only small amounts of frequently changed data on the client.

ASP.NET allows you to store information in a HiddenField control, which renders as a standard HTML hidden field. A hidden field does not render visibly in the browser, but you can set its properties just as you can with a standard control. When a page is submitted to the server, the content of a hidden field is sent in the HTTP form collection along with the values of other controls. A hidden field acts as a repository for any page-specific information that you want to store directly in the page.

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.
  • 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.

You have to understand the advantages and disadvantages before working on HiddenField so that program will remain in your court because it is one of the important concept under State Management in ASP.NET.

Find out positive reviews received by SynapseIndia for  website development.

SynapseIndia’s CEO Shamit Khemka says that employees at SynapseIndia work with motto to provide client satisfaction without giving them any chance to complaints in any cases.

Understanding Server Side State Management

Server side state management is different from client side state management but the operations and working is somewhat same in functionality. In server side state management, all the information is stored in the user memory. Due to this functionality, there are more secure domains at server side in comparison to client side state management.

Server-side options for storing page information typically have higher security than client-side options, but they can use more Web server resources, which can lead to scalability issues when the size of the information store is large. ASP.NET provides several options to implement server-side state management.

Below are Server Side  Techniques
Server side state management techniques are:
Session State
Application State
Profile Properties
Database Support

We will come to know more about all in deep in coming articles.

If you  understand these concepts then ball is in your court because it is one of the favorable question in ASP.NET interview.

Find out positive reviews received by SynapseIndia for their PHP website development.
SynapseIndia’s CEO Shamit Khemka says that employees at SynapseIndia work with motto to provide client satisfaction without giving them any chance to complaints in any cases.

 

Understanding Cookies in ASP.NET

A cookie is a small bit of text that accompanies requests and pages as they go between the Web server and browser. The cookie contains information the Web application can read whenever the user visits the site.

Cookies provide a means in Web applications to store user-specific information. For example, when a user visits your site, you can use cookies to store user preferences or other information. When the user visits your Web site another time, the application can retrieve the information it stored earlier.

For example, if a user requests a page from your site and your application sends not just a page, but also a cookie containing the date and time, when the user’s browser gets the page, the browser also gets the cookie, which it stores in a folder on the user’s hard disk.
Later, if user requests a page from your site again, when the user enters the URL the browser looks on the local hard disk for a cookie associated with the URL. If the cookie exists, the browser sends the cookie to your site along with the page request. Your application can then determine the date and time that the user last visited the site. You might use the information to display a message to the user or check an expiration date.

Cookies are associated with a Web site, not with a specific page, so the browser and server will exchange cookie information no matter what page the user requests from your site. As the user visits different sites, each site might send a cookie to the user’s browser as well; the browser stores all the cookies separately.
Cookies are also known by many names, HTTP Cookie, Web Cookie, Browser Cookie, Session Cookie, etc.

Type of Cookies?
1. Persist Cookie – A cookie has not have expired time Which is called as Persist Cookie
2. Non-Persist Cookie – A cookie has expired time Which is called as Non-Persist Cookie

We will come to know more about cookies in the coming articles.

If you understand this program then ball is in your court because it is one of the favorable question in ASP.NET interview.

Find out positive reviews received by SynapseIndia for their ASP.NET website development.
Employees at SynapseIndia work with motto to provide client satisfaction without giving them any chance of complaints in any case.

 

Difference between call by value and call by reference in PHP

Call by value means passing the value directly to a function. The called function uses the value in a local variable; any changes to it do not affect the source variable.

Call by reference means passing the address of a variable where the actual value is stored. The called function uses the value stored in the passed address; any changes to it do affect the source variable.

Let us understand it through code :

<?php
//Call by value program
function abc($x)
{
$x=$x+10;
return($x);
}
$a=20;
echo abc($a).”<br>”;
echo ($a);
?>
<?php
//Call by reference program
function abc(&$x)
{
$x=$x+10;
return($x);
}
$a=20;
echo abc($a).”<br>”;
echo ($a);
?>

If you understand this program then ball is in your court because it is one of the favorable question in PHP interview.

Find out positive reviews received by SynapseIndia for their PHP website development.
Employees at SynapseIndia work with motto to provide client satisfaction without giving them any chance to complaints in any cases.