November Happy Hour will be moved to Thursday December 5th.

Xform: Success Action method not firing

Vote:
 

Questions on XForm in Blocks MVC 4 Sending data action Success event not firing in Episerver 7


Hi ,I am now using Episerver 7 MVC to create some Xform for sending mail or redirect to other page.

When i post my data , the Success Action could not be triggered, but if I am sending incorrect data it will trigger Failed action method properly.

while XformPost ActionMethod triggers SuccessAction method it gives an error "Server cannot append header after HTTP headers have been sent."

code :

[AcceptVerbs(HttpVerbs.Post)]
public virtual ActionResult Success(XFormPostedData xFormPostedData)
{
return RedirectToAction("Index", new { language = PageContext.LanguageID });
}

[AcceptVerbs(HttpVerbs.Post)]
public virtual ActionResult Failed(XFormPostedData xFormPostedData)
{

return RedirectToAction("Index", new { language = PageContext.LanguageID });
}

[AcceptVerbs(HttpVerbs.Post)]
public virtual ActionResult XFormPost(XFormPostedData xFormPostedData, string contentId)
{
_contentId = contentId;
//XFormData formData = new XFormPageHelper().GetXFormData(this, xFormPostedData);
//XFromAfterSubmitPostedData(xFormPostedData, formData);
return _xformHandler.HandleAction(this);
}

#87463
Jun 13, 2014 9:42
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.