protected override void LoadToView(CaseStageDomObj caseStage) { Button btn = (Button)((ViewComplaint)Page).ReturnTheButton(); Button _button = (Button)Serialize<Button>(btn); ViewState.Add("Button", _button); } public static MemoryStream Serialize<Button>(Button btn) { DataContractSerializer s = new DataContractSerializer(typeof(Button)); MemoryStream ms = new MemoryStream(); s.WriteObject(ms, btn); return ms; }
'System.IO.MemoryStream'
'System.Web.UI.WebControls.Button'
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)