0

I have a sharepoint 2013 farm with web content management. In the custom website, I am using few asp.net custom controls inside the master page. Here is one of the simple Custom control code referenced in the Master page.

LinkButton control with post back event for logout and added this control to the master page.

 protected void logoutLink_Click(object sender, EventArgs e)
        {
            var strLogoutUrl = ConfigurationManager.AppSettings["LogoutUrl"];
            HttpContext.Current.Response.Redirect(strLogoutUrl);    
        }

Once the Page is rendered the __doPostBack() event supported fire upon click of the logout button is not firing up. Here is the error message I see in the browser JS console in the browser.

SCRIPT5009: '__doPostBack' is undefined

While Looking into the html source, I dont find the reference to webResource.axd? with a definition for __doPostBack() Method.

<a href="javascript:__doPostBack('ctl00$ctl00$ModalLoginPanel$ctl12','')" onclick="s_objectID=&quot;javascript:__doPostBack('ctl00$ctl00$ModalLoginPanel$ctl12','')_1&quot;;return this.s_oc?this.s_oc(e):true"> (Logout) </a>

Where As I do see another reference to a webresource.axd? With js function related to ASP. Menu control which we use in the master page.

The issue here, is for some reason the webresource.axd containing Post back related javascript references were not getting added to the generated Html source.

Stuck with this for the last 4 days. Any help to get out this is appreciated.

PS : Post back event is not firing for OOB Sharepoint controls as well.

Franck
  • 742
  • 3
  • 11

1 Answers1

0

See here for fixes:

http://www.hanselman.com/blog/IE10AndIE11AndWindows81AndDoPostBack.aspx

Basically this is fixed in ASP.NET 4.5 (which doesn't apply to SharePoint 2013) but there is also an older patch for all versions of the .NET framework.

IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
  • This is not an IE10,11 specific issue in my case. I can able reproduce this in Chrome & FF. None of the patches listed in the list is applicable to my environment as its running on Server12. – user1475162 Dec 01 '13 at 20:48
  • Issue I am facing with the SP site is not specific to IE10. I can reproduce it in all browsers versions [Ie8, Ie9 , Chrome, FF]. More over the KB 2600088 recommended by Hanselman is not applicable to Server 12 OS. Just to reiterate, this could be something to do with Share point 2013. It just skips adding the webResource.axd reference required to handle the postback. Where as it still allows reference to ASP.net Menu related JS scripts thru a different webresource.axd reference. – user1475162 Dec 01 '13 at 21:09
  • How have you packaged and deployed custom master page and user control? – IrishChieftain Dec 01 '13 at 23:33
  • Yes. Custom master pages and controls were added as feature to a share point project and deployed through wsp. – user1475162 Dec 03 '13 at 16:18