Controller Behavior for different rendering tags

Vote:
 

I am running into an issue where I have a controller that I want to behave a certain way for the end user, but I still want the editors to be able to modify the content on the page.  Basically, when calling the controller, I want to say that if it was a GET request, they should be redirected back to a form page, but if they submitted a POST request to that page, then it displays the page as normal.  The problem is that when viewing the page in preview or edit mode, it is doing the redirect instead of allowing the editor to stay on the page.

#148138
May 04, 2016 14:26
Vote:
 

Can you check in index action if the page is opened in edit mode?

if (PageEditing.PageIsInEditMode)
{
    // ...
}
#148139
May 04, 2016 14:38
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.