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 -

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  " />

Where @aaa is the page to call

Again, this only happens in IE

Any help would be appreciated
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ioannis ParaskevopoulosCommented:

Can you try wrapping @aaa with double quotes:

<form action= "@aaa" method="post">
   <input type="submit" value=" New List  " />

Open in new window

PNRTAuthor Commented:
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
Ioannis ParaskevopoulosCommented:
Can you paste the resulted code when it renders on the browser?

Do you see any errors on IE console?
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

PNRTAuthor Commented:
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.
Ioannis ParaskevopoulosCommented:
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)?
PNRTAuthor Commented:

<!DOCTYPE html>
<html lang="en">
    <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" />
    <div id="page">
        <div id="header">
            <p class="site-title">The Site</p>
            <div id="login">
                        <a href="/Account/ChangePassword" title="Change password">email address</a>
                        <a href="/Account/Logout">Logout</a>
            <ul id="menu">
                <li><a href="/">Home</a></li>
                <li><a href="/Account/CustomerAuthenticate">Enter</a></li>
                <li><a href="/About">Contact</a></li>
        <div id="main">
            <div id="content">
                <h1>Order Authorization</h1>
        <p style="font-family:arial;color:#000;font-size:16px;">Username</p>

<!DOCTYPE html>
     <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;}


    <body >
            <legend>Order Details</legend>
                <form action= "/Cgrid/" method="post">
                    <input type="submit" value=" New Orders  " />
                <form action= "/underconstruction.vbhtml/" method="post">
                    <input type="submit" value="  Previous Orders " />
</body >
            <div id="footer">
                &copy; 2015 - Our Company

Open in new window

Ioannis ParaskevopoulosCommented:
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.
PNRTAuthor Commented:
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!
Ioannis ParaskevopoulosCommented:
I would never be sarcastic to a stranger...

I just wanted to verify that this was not a mistake on pasting the code (it happens to the best).

You should first of all try to make this a valid html document. If you need help let me know. There are online tools that may help you see what errors you have.

I usually use this. It allows you to directly add your html code if you do not want to give a url or something.

It seems to me that you have added partial views and did not remove the initial code.

Please try to clear your code and let's see if it will work.

Keep in mind that non-IE browsers, are much more forgiving, though they will still complain, and non-valid code may lead to unexpected results in any way.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PNRTAuthor Commented:
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.
Ioannis ParaskevopoulosCommented:
Let me know if you need any help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.