Wednesday, February 15, 2012

Generate Xml from code behind using soap function

 using System.Xml;
 using System.Xml.Serialization;
 using System.Runtime.Serialization.Formatters.Soap;


-----------------------------------------------
MemoryStream stream1 = new MemoryStream();
        new SoapFormatter().Serialize(stream1, "hi");
        stream1.Position = 0;
        StreamReader reader1 = new StreamReader(stream1);
           string a=  reader1.ReadToEnd().ToString();

No comments:

Post a Comment