Cause of the occurrence
. NET2.0 and . there is an error in the browser definition file published with NET4.0, which saves a significant portion of the browser version definition. However, some versions of the browser (such as ie10,11) are no longer within this range. As a result,ASP . NET sees them as unknown browsers, default demotion processing, which will cause inconvenience to users, such as not support JavaScript features. An error occurs when the rendering mechanism of the ASP. NET server control Asp:linkbutton .
server controls:
<asp:linkbutton id="Logout" runat="server" onclick= " logout_click"> logout </asp:LinkButton>
Post-rendered HTML code:
<id= "Logout" href= "Javascript:__dopostback (' Logout ', ')" > logout </a>
Then look at the automatically generated JS code:
var theform = document.forms[' Form1 ']; if (! theform) { = document.form1;} function __doPostBack (Eventtarget, eventargument) { iffalse)) { = Eventtarget; = eventargument; Theform.submit (); }}
As you can see, LinkButton relies on the JS method _dopostback to submit the form, thus executing the server method. The browser's JS interpreter will report _dopostback undefined error to the user because the browser is not recognized and causes it to not generate _dopostback correctly.
Solution Solutions
symptoms: Installing NuGet app_browsersupdate Package. Help the. NET Framework understand the new browser. Only valid on pages of this website.
Fix it: Install patches on your server. 2600088 for. NET4.0 or 2600100 for. NET2.0
When the client is Windows7, IE10 and IE11 generally do not appear this error. However, when the client OS is Windows8 , the IE11 situation still exists.
At this point, try to install. NET Framework4.5 on the server to resolve this issue.
However, . NET Framework4.5 does not support OS Windows Server 2003, so if your site is under construction, it is recommended that you discard the LinkButton control .
Finish
IE10,IE11 Click LinkButton appears _dopostback undefined error resolution