.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Serialization in ASP.Net

Posted By: Asha.MP     Posted Date: October 14, 2010    Points:2   Category :ASP.Net
Hi..

What is Serializaion in .Net? and what is use of serialization?

Responses
Author: Sajid P K             
Posted Date: October 14, 2010     Points: 5   

Asha,


Serialization is a process of converting an object into a stream of data so that it can be is easily transmittable over the network or can be stored in db or file system.

Later we can recreate exact object by using this.


More Details please Vist

http://aspalliance.com/983

Author: Alex             
Posted Date: October 14, 2010     Points: 5   

Serialization is a process of converting an object into a stream of data so that it can be is easily transmittable over the network or can be continued in a persistent storage location. This storage location can be a physical file, database or ASP.NET Cache. Serialization is the technology that enables an object to be converted into a linear stream of data that can be easily passed across process boundaries and machines. This stream of data needs to be in a format that can be understood by both ends of a communication channel so that the object can be serialized and reconstructed easily. The advantage of serialization is the ability to transmit data across the network in a cross-platform-compatible format, as well as saving it in a persistent or non-persistent storage medium in a non-proprietary format. Serialization is used by Remoting, Web Services SOAP for transmitting data between a server and a client. De-serialization is the reverse; it is the process of reconstructing the same object later. The Remoting technology of .NET makes use of serialization to pass objects by value from one application domain to another

Author: Dhivakaran             
Posted Date: October 19, 2010     Points: 5   

Hi

Serialization is a process of converting an object into a stream of bytes that can be saved in the memory, in a file or on the disk. Consider you have a class which has several members of different data types.

But we use object of that class as a whole. In case we wanted to write a object on a file, we would need to serialize the object into bytes and write on the file, and if our requirement was to read from a file we would deserialize the bytes written in the file to a object form and use in our program. Thus the common use of serialization is to save an object and of deserialization is to retrieve that object when required. You could think of another use of serialization, remember the remoting, web services and SOAP, they all require data transfer in bytes. .NET Framework supports built in serialization. We can accomplish using two methods:

Using System.Runtime.Serialization namespace

Using System.Xml.serialization




-
Dhivakaran T
Author: Ramesh P             
Posted Date: October 19, 2010     Points: 5   

Serialization is a process of converting an object into a stream of bytes that can be saved in the memory or in a file or on the disk. The main purpose is to save the state of an object in order to have the ability to recreate the same object when required. There are three types of serialization. They are,

1. Binary serialization
2. XML serialization
3. SOAP serialization

Regards,


Ramesh

Author: krishana singh             
Posted Date: October 23, 2010     Points: 5   

Serialization is a process of taking an object and converting into a form so that it can be transported across the network or can be persisted in the storage location. This storage location can be physical file, database or ASP.NET Cache. The form contains the state of the object so that by this format, we can construct the same object a later point in time, which is called Deserialization.

There are three formats of serialization

Binary Serialization : Light and compact used in Remoting
SOAP Serialization : interoperable use SOAP and used in web Services
XML Serialization : Custom Serialization


Constructor that is overridden and can handle the Deserialization process
GetObject method that tracks about which data is serialized.
A small example below illustrate this all.

public class Employee :ISerializable
{
private int emp_no;
private string name;

protected TestData(SerializationInfo info,StreamingContext context)
{
this.emp_no = info.GetInt32("emp_no");
this.name = info.GetString("name");
}
void ISerializable.GetObjectData(SerializationInfo info,
StreamingContext context)
{
info.AddValue("emp_no", this.emp_no);
info.AddValue("name", this.name);
}

}
}



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend