I am writing a personalized section of a website where the loggedin user will be able to update his profile. The profile is stored using a custom
CustomerPart. This CustomerPart is attached to a content type called
MyProfile, from which I created a content item that is displayed in the front-end
I would like the customer to be able to edit his own information as stored by the CustomerPart.
Currently, I use the driver's Display method to create a shape that renders an edit form. The form is posted to the
UpdateProfile action of a CustomerController.
Now I could mark that action with the [Themed] attribute and return a shape that redisplays the
CustomerPart; however, all other parts of the MyProfile content item will then not get rendered.
I could also store the current url in a hidden field, and redirect to it. But then I would loose all ModelState Errors (unless I store them in TempData).
So I am looking for a way in which I can somehow integrate into the shape building process of the page and invoke the
Update driver method of the CustomerPart when the user hits a "Save Changes" button.
Any pointers into the right direction would be greatly appreciated.