public class Product
{
public int ProductId { get; set; }
public string ProductName { get; set; }
public decimal UnitPrice { get; set; }
}
i want to take a List<Product> and POST it as serialized data to another page (really just .ashx page), is this possible in asp.net web forms?
Update I know I can use session to pass the generic list to my handler but would it be better post as serialized data? Pros and Cons please? Is one better than the other for heavy loads?
one way is using System.Web.Script.Serialization.JavaScriptSerializer that serializes to and from json format.
http://msdn.microsoft.com/en-us/library/system.web.script.serialization.javascriptserializer.aspx