Today I finally solved a problem that I have been trying to hunt down for a long time. I haven’t been able to find any good help on this elsewhere, so let me share how I solved it.
This is my setup: I have SharePoint Online site, where I open a modal window to load a page from a provider hosted app (Add-In). The app is running in Azure Websites (Web Apps). The page is built with ASP.Net WebForms and displays a simple form that you submit back to the app.
The problem was that when you clicked the submit button in Internet Explorer, a JavaScript in MicrosoftAjaxWebForms.debug.js crashed, preventing the postback:
1 2 |
SCRIPT5007: Unable to get property 'PRM_ParserErrorDetails' of undefined or null reference File: MicrosoftAjaxWebForms.debug.js, Line: 1432, Column: 13 |
Other browsers worked fine though. The solution was stupid simple, but easy to miss:
The Azure site need to be added as a trusted site in Internet Explorer!
For the curious: The postback never seemed to make it back to the server. Actually it did, but it got stuck in the Page_PreInit() mehod, where SharePointContextProvider.CheckRedirectionStatus() returned a “RedirectionStatus.CanNotRedirect” and the the connection ends.
put the below lines of code at page_load event..
it should be placed outside post back and inside page_load event
ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnExport)
Thank you so much I have been searching for a solution for days and finally this worked.
Its work thanks!
Its working..
ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnExport)
btnExport is button id
Thanks so much Antony!
ScriptManager.GetCurrent(Page).RegisterPostBackControl(btnExport) works for me too.
I really appreciate your post. It took me 3 days to find out I have to put one line outside the post :( You are a life saver.
Thanks so much Antony