AjaxControlToolkit.HtmlEditor.EditPanel.LoadPostData C# (CSharp) Method

LoadPostData() protected method

protected LoadPostData ( string postDataKey, System postCollection ) : bool
postDataKey string
postCollection System
return bool
        protected override bool LoadPostData(string postDataKey, System.Collections.Specialized.NameValueCollection postCollection)
        {
            base.LoadPostData(postDataKey, postCollection);

            var contentForce = false;

            var post = postCollection[ContentForceId];
            if(!String.IsNullOrEmpty(post))
                contentForce = true;

            post = postCollection[ActiveModeId];
            if(!String.IsNullOrEmpty(post))
                ActiveMode = (ActiveModeType)(Int64.Parse(post, CultureInfo.InvariantCulture));

            _contentChanged = false;
            post = postCollection[ContentId];
            if(post != null && contentForce) {
                var cont = (String)post.Replace("&lt;", "<").Replace("&gt;", ">").Replace("&quot;", "\"").Replace("&amp;", "&");
                if(cont == "<br />")
                    cont = String.Empty;

                _contentChanged = (Content.Replace("\n", String.Empty).Replace("\r", String.Empty) != cont.Replace("\n", String.Empty).Replace("\r", String.Empty));
                Content = cont;
            }

            post = postCollection[ContentChangedId];
            if(!String.IsNullOrEmpty(post))
                _contentChanged = true;

            return (_contentChanged);
        }