This project is read-only.

Using Content Part from controller in my module

Topics: Customizing Orchard, General, Writing modules
Mar 20, 2014 at 4:01 PM
Edited Mar 20, 2014 at 4:02 PM
So, I think I am missing something simple but if someone could share a little snippet or something to get me over the hump, I would be grateful. I would like to use a content part, in edit mode, from my controller. Right now I can get it to return on of my shapes, which looks like this
    public ActionResult UpdateAddress()
        var shape = _services.New.Update_Address();
        return new ShapeResult(this, shape);

    public ActionResult Register(AddressViewModel address)
        return RedirectToAction("Index");
This all works but I would love to do this with my AddressPart. This is a contrived example for a concept I am trying to learn and realize this example might be done better from content parts inside of orchard, but humor me please if you know how to do what I am asking.

thanks in advance