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
LVL 2
PNRTAsked:
Who is Participating?
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:
Hi,

Can you try wrapping @aaa with double quotes:

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

Open in new window


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

Do you see any errors on IE console?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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.
0
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)?
0
PNRTAuthor Commented:
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">
                &copy; 2015 - Our Company
            </div>
          </div>
    </div>
</body>
</html>

Open in new window

0
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.
0
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!
0
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.

Giannis
0

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.
0
Ioannis ParaskevopoulosCommented:
Let me know if you need any help.
0
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
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.