protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection) { string data = Page.Request.Form[PostedDataFormName]; this.DocumentProperty = JSONSerializerExecute.Deserialize<DocumentProperty>(data); if (DocumentProperty.InitialData.IsNotEmpty()) { this._InitialData = HttpUtility.UrlDecode(DocumentProperty.InitialData);//.Replace("+", HttpUtility.UrlEncode("+"))); DocumentProperty.InitialData = this._InitialData; } //if (data.IsNotEmpty()) // this._InitialData = HttpUtility.UrlDecode(data); return base.LoadPostData(postDataKey, postCollection); }
public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer) { DocumentProperty docProp = new DocumentProperty(); docProp.Id = dictionary.GetValue("Id", (string)null); docProp.InitialData = dictionary.GetValue("InitialData", (string)null); if (dictionary.ContainsKey("DocumentImages")) { DocumentImageList docImages = JSONSerializerExecute.Deserialize<DocumentImageList>(dictionary["DocumentImages"]); docProp.DocumentImages = docImages; } //if (dictionary.ContainsKey("DocImageProps")) //{ // ImagePropertyCollection imageProps = JSONSerializerExecute.Deserialize<ImagePropertyCollection>(dictionary["DocImageProps"]); // docProp.DocImageProps = imageProps; //} return docProp; }