Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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);
}