Copied to clipboard

Flag this post as spam?

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


  • Paul Stoker 39 posts 72 karma points c-trib
    Jan 21, 2014 @ 17:15
    Paul Stoker
    0

    Umbraco 6: How to access content from custom back office page

    Hi Guys,

    We are currently upgrading an Umbraco instance from 4.7.2 to 6.1.6.

    There is a couple of user controls which are hooked into the back office which access the data but they are using now obsolete methods to do this.

    E.g. 

    var websiteDocuments = Document.GetDocumentsOfDocumentType(DocumentType.GetByAlias("Website").Id).ToList();

    My question is, how can I access the new ContentServices from a user control built for the back office?

    If you can point in the direction of any suitable reference/wiki/guides that'd be great and ideally I'd like to do this using the MVC approach but not sure if it's possible in this version

  • Ismail Mayat 4511 posts 10090 karma points MVP 2x admin c-trib
    Jan 21, 2014 @ 17:26
    Ismail Mayat
    0

    Paul,

    The docs for managment apis which are the equivalent of Document.whatever can be found http://our.umbraco.org/documentation/Reference/Management-v6/Services/ with regards to making dashboard controls that are mvc not sure if thats possible as the controls are loaded through dashboard.config and they expect webforms user controls.

    Regards

     

    Ismail

  • Paul Stoker 39 posts 72 karma points c-trib
    Jan 21, 2014 @ 17:53
    Paul Stoker
    0

    Thanks Ismail, I saw those references but wasn't sure how to invoke new Services.

    I've switched to using this method below which should get me what I need without newing anyrthing up

    UmbracoContext.Current.Application.Services
  • Steve Brown 125 posts 290 karma points
    Feb 12, 2014 @ 16:24
    Steve Brown
    0

    I'm confused. Is it possible to create a web forms user control for the dashboard? I'm trying to create a web form user control and add it to the dashboard, but it doesn't appear to be doing any postback or server side processing.

  • Steve Brown 125 posts 290 karma points
    Feb 12, 2014 @ 17:08
    Steve Brown
    0

    or, does it have to be an MVC user control for umbraco 6.1.x dashboard items?

  • Paul Stoker 39 posts 72 karma points c-trib
    Feb 12, 2014 @ 17:40
    Paul Stoker
    0

    Hi Steve, 

    I think you can only have web forms user controls in the back office currently.

    What have you done so far?

  • Steve Brown 125 posts 290 karma points
    Feb 12, 2014 @ 19:45
    Steve Brown
    0

    I created a web forms user control with a simple form and a submit button. Submitting the form should cause some data to get saved in a database.

    When I fill out my form and click submit however, nothing happens. No postback or server-side processing takes place

  • Steve Brown 125 posts 290 karma points
    Feb 12, 2014 @ 20:58
    Steve Brown
    0

    Where do I put the compiled dll for the webform user controls, for the dashboard? I have it in the bin folder. it's like it has no code-behind or postback

  • Steve Brown 125 posts 290 karma points
    Feb 12, 2014 @ 21:42
    Steve Brown
    0

    I just checked something. Postback is occuring for other controls on the page, just not the click event for the button.

Please Sign in or register to post replies

Write your reply to:

Draft