- 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 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" %>
MORE TO READ:
- 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
I think i found that the problem has been fixed in .NET 4.5, and remembering than Hanselman talked about it beeing that in older versions of the .NET framework, they did browser feature detection from the Browser Definition files. This was ok, but defnetly not a good solution, as whenever a new browser is released, the Browser definition files shuold be updated.
I think to remember thant in the newest version of the framework, they changed to feature detection, by simply asking the current browser for its features, instead of asking the browser definition files. This Means that when new browsers are released, .NET applications shuoldnt break anymore.