开发者

Server-side button works in Firefox but not IE

开发者 https://www.devze.com 2023-01-17 13:20 出处:网络
Anyone know why a simple onclick=\"btnSubmit_Click\" 开发者_如何学运维button that calls a server-side function would work in Firefox but not IE.Server side code is irrespective of the browser.Hope som

Anyone know why a simple onclick="btnSubmit_Click" 开发者_如何学运维button that calls a server-side function would work in Firefox but not IE.


Server side code is irrespective of the browser.Hope some problem with your code only.Check it


It's the default button behavior. In all browsers I've tested except Internet Explorer, a button without a type attribute saying otherwise has a default submit behavior. In IE, it's just a button (type="button"), running local code, by default; you need to add a type="submit" attribute to cause the form to be submitted to the server for processing if the called local code doesn't submit it for you.


Not knowing the details of your implementation, I suggest trying to use Internet Explorer's developer tool, to see what is being posted, if anything, when you click that button.

It may lead you to something else that could help you solve the problem.


I just had the same issue. Apparently IE Compatibility Mode has something to do with it. I got my program to work by disabling it on my Master page from an article I found.

<html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
         <meta http-equiv="X-UA-Compatible" content="IE10; IE=9; IE=8; IE=7; IE=EDGE" />
         <title></title>
0

精彩评论

暂无评论...
验证码 换一张
取 消