tags:

views:

55

answers:

3

Anyone know why a simple onclick="btnSubmit_Click" button that calls a server-side function would work in Firefox but not IE.

A: 

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

anishmarokey
See my comment above. I'm clueless as to why this would fire depending on the browser I'm thinking it's a server setting.
Ricky
Not sure, but it sounds as if they're saying the button is not triggering the server-side code.
Steven Sudit
Yes that's what I'm saying. But only in IE what could possibly be the basis for this. It doesn't make sense.
Ricky
@Ricky. Keep it simple. Create a new ASP.NET Web app with a simple form, add a button which fires an OnClick to it. Im pretty sure that will work in IE, which implies its not IE the problem, but how you've implemented it.
RPM1984
A: 

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.

Stan Rogers
Thanks just tried adding this to no avail.
Ricky
A: 

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.

Roberto Sebestyen