This error can occur in asp.net pages. In certain situations .net will fail to create the __doPostBack JavaScript function and the hidden __EVENTVALIDATION input field. The situations that can cause this are:
- When using asp:ImageButton or asp:LinkButton controls AND:
- When viewing the webpage using IE11
- When viewing the webpage using an iPhone or an iPad that was updated to the latest iOS 7.
The problem revolves around the BrowserDefinitions in .NET. .NET uses these Browser Definitions to identify the capabilities of the current browser. As per default, if a browser is not known (i.e. not defined in the BrowserDefinitions), .net assumes that the browser have no JavaScript capabilities, and therefore the __doPostBack function is not needed.
Assuming that a browser is not JavaScript compatible by default in the year 2013 is probably pretty stupid. However, this is the reality and we need to cope with it.
The browserdefintions are defined in the belly of .net (for example here: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Browsers).
The later a .net version you have, the newer the .net version, the more likely it is that the browser is known. .NET 4.5 should know about IE11 and the latest iPhone and iPad browsers.
POSSIBLE SOLUTION: SETTING THE CLIENTTARGET=UPLEVEL ON THE .ASPX PAGE
There is a way to override the automatic detection of browser capabilities. Add the following to the <% Page %> directive on all of your .aspx pages:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="somecodebehind" ClientTarget="uplevel" Inherits="somecode" %>
Setting ClientTarget=”uplevel” forces the page to generate JavaScript as it assumes that the browser has at least the capabilities of IE6.
MORE TO READ:
- Bug and Fix: ASP.NET fails to detect IE10 causing _doPostBack is undefined JavaScript error or maintain FF5 scrollbar position by Scott Hanselmann
- Some StackOverflow Q/A articles:
- A hotfix is available for the ASP.NET browser definition files in the .NET Framework 2.0 SP2 and in the .NET Framework 3.5 SP1 Microsoft article
Image may be NSFW.
Clik here to view.

Clik here to view.
