Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Byron Delgado 47 posts 70 karma points
    Apr 05, 2011 @ 12:54
    Byron Delgado
    0

    UpdateDocumentCache does not work for custom UsercontrolDataEditor

    Hi guys, I hope you can help me with this one.

    I created a custom UsercontrolDataEditor with is wrapped with "umbraco usercontrol wrapper". As example I put an ordinary text box in the ascx wich will be assigned to _umbval (the return value for the control).

            private string _umbval;
            public object value
            {
                get { return Status.Text; }
                set { _umbval = value.ToString(); }
            }
    

    As experiment I try to save this value, not by pressing the publish button, but by internally publish code, like this.

        Document currentDoc = new Document(int.Parse(Request.QueryString["id"]));
    
        //publish doc
        currentDoc.Publish(User.GetCurrent());
        umbraco.library.UpdateDocumentCache(currentDoc.Id);
    

    The problem is that _umbval is only saved when the publishing button is pressed, and the code above is obsolete.

    Thanks for any resonse.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies