I have searched the topic here and a few relate but no answers have fixed my issue. I have a basic form which has a page set to redirect to after submit and it does not kick off the AfterSubmitPostedData (which is attached in the global.asax.cs file) when the form is submitted. It saves the data to the database but refuses to redirect. The default handlers in global.asax should work but I have also tried to attach directly in the control but with no success. Is there something obvious I should look at?
Try setting a break point inside the XForm_AfterSubmitPostedData method and debug to see what happens.
The code that does the redirect looks something like this.
if (control.FormDefinition.PageGuidAfterPost != Guid.Empty)
PermanentPageLinkMap pageMap = PermanentLinkMapStore.Find(control.FormDefinition.PageGuidAfterPost) as PermanentPageLinkMap;
if (pageMap != null)
You might have seen this in other topics while searching for an answer, but in case not...: I had problems before with getting the AfterSubmitPostedData event to my event handler when a page after post was set. I was able to get it working by moving the event registration (which was in OnLoad) to OnInit. I interpret it that as the redirect was being performed in such a way that the event chain was interrupted before reaching my event handler. By registering the handler earlier it would end up being called before whatever-it-was happened that prevented it from being called. But if you don't even get redirected that might not be the problem at all.
I have put breakpoint on the global AfterSubmitPostedData in the global asax.cs file but it doesnt enter it. The XForm_ControlSetup and XForm_BeforeLoadingForm methods get called but nothing else. Are you suggesting that I create my own handler and attach it in the OnInit of the control instead? As I said - the form works fine as far as saving the data goes and just doesnt redirect. The form is on a complex page though so it could be something mucking about with the chain of control after the post.
I misinterpreted your question, sorry. See if you can get the form to work as expected if used on a simpler page type?
Did you solve this?I have the exact same problem.
Got the same problem!