PNRT
asked on
ASP.Net Page only runs in IE if debugger is open
Hi Experts. I have an ASP.Net/Razor/Webmatrix website that runs perfectly in Webmatrix itself and also in Chrome, However, in IE a button click just hangs. But if the debugger is opened it works fine. The symptoms are the same as mentioned here -
http://stackoverflow.com/questions/7742781/why-javascript-only-works-after-opening-developer-tools-in-ie-once
In this article the solution centres around removing all console references - I've checked, I have none. Other references are to caching of JScript - I have added Response.OutputCache (0) to the two relevant areas of code, still no joy.
The actual button is
<form action= @aaa method="post">
<input type="submit" value=" New List " />
</form>
Where @aaa is the page to call
Again, this only happens in IE
Any help would be appreciated
http://stackoverflow.com/questions/7742781/why-javascript-only-works-after-opening-developer-tools-in-ie-once
In this article the solution centres around removing all console references - I've checked, I have none. Other references are to caching of JScript - I have added Response.OutputCache (0) to the two relevant areas of code, still no joy.
The actual button is
<form action= @aaa method="post">
<input type="submit" value=" New List " />
</form>
Where @aaa is the page to call
Again, this only happens in IE
Any help would be appreciated
ASKER
Sorry, tried the "" but made no difference. Still only runs when debugger is open. Also tried it on
the new Edge browser and it works fine. So works on Chrome, IE7 and Edge but doesn't work on IE 11. Would appreciate any other ideas
the new Edge browser and it works fine. So works on Chrome, IE7 and Edge but doesn't work on IE 11. Would appreciate any other ideas
Can you paste the resulted code when it renders on the browser?
Do you see any errors on IE console?
Do you see any errors on IE console?
ASKER
Hi, many thanks for the reply. There were no errors in the console, in fact nothing happened when the console is closed. And when the console is opened everything runs perfectly, so no errors. I'm now downloading IE 10 to see if it does it on that version, So far I seems only 11 is effected. Thanks gain.
Is it possible to get a link to the page?
Is it possible that you paste the rendered code (at least the one of the form)?
Is it possible that you paste the rendered code (at least the one of the form)?
ASKER
Hi
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>The Site</title>
<link href="/Styles/Site.css" rel="stylesheet" />
<link href="/favicon.ico" rel="shortcut icon" type="image/x-icon" />
</head>
<body>
<div id="page">
<div id="header">
<p class="site-title">The Site</p>
<div id="login">
<p>
<a href="/Account/ChangePassword" title="Change password">email address</a>
<a href="/Account/Logout">Logout</a>
</p>
</div>
<ul id="menu">
<li><a href="/">Home</a></li>
<li><a href="/Account/CustomerAuthenticate">Enter</a></li>
<li><a href="/About">Contact</a></li>
</ul>
</div>
<div id="main">
<div id="content">
<h1>Order Authorization</h1>
<p style="font-family:arial;color:#000;font-size:16px;">Username</p>
<!DOCTYPE html>
<html>
<head>
<title>Order Details</title>
<style type="text/css">
label { float: left; width: 8em; text-align: right; margin-right: 0.5em;}
fieldset { padding: 1em; border: 1px solid; width: 25em;}
legend { padding: 2px 4px; color:#000; border: 1px solid; font-weight: bold;}
.validation-summary-errors {font-weight:bold; color:red; font-size:11pt;}
</style>
</head>
<body >
<fieldset>
<legend>Order Details</legend>
<br>
<form action= "/Cgrid/" method="post">
<input type="submit" value=" New Orders " />
</form>
<br>
<form action= "/underconstruction.vbhtml/" method="post">
<input type="submit" value=" Previous Orders " />
</form>
</fieldset>
<br>
</body >
</html>
</div>
<div id="footer">
© 2015 - Our Company
</div>
</div>
</div>
</body>
</html>
Do you really have the doctype declaration twice? This could really be an issue.
What you posted is by far not a valid html, even if it shows on browsers.
What you posted is by far not a valid html, even if it shows on browsers.
ASKER
Was that a question or just sarcasm. If you can read in the post then it would appear to be the case.
Are you suggesting that this is the cause of the problem or making a comment!
Are you suggesting that this is the cause of the problem or making a comment!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you very much for the help. In fact I had removed a lot of the code to try and find the problem and had copied back the partial view incorrectly, although as you say it did still work which is why I hadn't picked it up, I'll get the original code back and start again.
Let me know if you need any help.
Can you try wrapping @aaa with double quotes:
Open in new window
Giannis