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="javascript:__doPostBack('ctl00$ctl00$ModalLoginPanel$ctl12','')_1";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.