I'm using Microsoft Visual Web Developer 2010 Express.
I have a hidden image button, that is set to visible="true" if the user uploads an image. Here is the code:
aspx file:
<asp:UpdatePanel ID="upOne" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:ImageButton ID="btnImageOne" runat="server" CssClass="btnImage"
Visible="false" onclick="btnImageOne_Click" />
<asp:LinkButton ID="btnDeleteOne" runat="server" CssClass="btnDelete" Visible="false"
onclick="btnDeleteOne_Click"> </asp:LinkButton>
</ContentTemplate>
</asp:UpdatePanel>
When visible, if clicked by the user, the button does: aspx.cs file:
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();
}
}
}
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 (unmodified) file.
j = Array.prototype.push
I am presented with the message:
Runtime Error in Microsoft JScript: 'Array' is not defined
In the same window, I can see three buttons: Break, Continue, Ignore.
Note: Break Points in the Page Load run without a problem.
The call stack says:
Anonymous Function JScript
JScript global code JScript
Questions:
Q1. Why is this happening?
Q2. How can I fix it?