Note that there are some explanatory texts on larger screens.

plurals
  1. PORuntime Error in Microsoft JScript: 'Array' is not defined
    text
    copied!<p>I'm using Microsoft Visual Web Developer 2010 Express.</p> <p>I have a hidden image button, that is set to visible="true" if the user uploads an image. Here is the code:</p> <p><strong>aspx file:</strong></p> <pre><code> &lt;asp:UpdatePanel ID="upOne" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:ImageButton ID="btnImageOne" runat="server" CssClass="btnImage" Visible="false" onclick="btnImageOne_Click" /&gt; &lt;asp:LinkButton ID="btnDeleteOne" runat="server" CssClass="btnDelete" Visible="false" onclick="btnDeleteOne_Click"&gt;&amp;nbsp;&lt;/asp:LinkButton&gt; &lt;/ContentTemplate&gt; &lt;/asp:UpdatePanel&gt; </code></pre> <p>When visible, if clicked by the user, the button does: <strong>aspx.cs file:</strong></p> <pre><code> protected void btnDeleteOne_Click(object sender, EventArgs e) { if (Session["fuOneFilename"] != null) { File.Delete(Server.MapPath("~/animals/temp/") + (string)Session["fuOneFilename"]); Session["fuOneFilename"] = null; DisplayUploadedPictures(); if (Session["mainImageFilename"] == Session["fuOneFilename"]) { Session["mainImageFilename"] = null; DisplayMainImage(); } } } </code></pre> <hr> <p>I placed a Break Point in the seccond line of the aspx.cs file. After pressing F5, the application stops in a JavaScript line, located inside the jQuery <em>(unmodified)</em> file.</p> <pre><code>j = Array.prototype.push </code></pre> <p>I am presented with the message: </p> <blockquote> <p>Runtime Error in Microsoft JScript: 'Array' is not defined</p> </blockquote> <p>In the same window, I can see three buttons: Break, Continue, Ignore.</p> <p><strong>Note:</strong> Break Points in the Page Load run without a problem.</p> <hr> <p><strong>The call stack says:</strong></p> <blockquote> <p>Anonymous Function JScript</p> <p>JScript global code JScript</p> </blockquote> <hr> <h1>Questions:</h1> <p>Q1. <strong>Why is this happening?</strong></p> <p>Q2. <strong>How can I fix it?</strong></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload