I have an asp.net image button that basically displays an image of a product based on user selections, and sets a link to an external site accordingly. When I click the image button in IE, it crashes the site, but it seems to work fine in Chrome. As an example:

if (TotalWattage > 1 && TotalWattage < 275) //depending on wattage calculation, shows PSU recommendation
    {
        imgbtnPSURecommend.ImageUrl = "~/Images/PSU Tool Images/CM-300.jpg";
        lblPSURecommend.Text = "300w COOLMAX CM-300";
        imgbtnPSURecommend.PostBackUrl = "http://www.newegg.com";
    }

If I launch the site and click the image, it crashes back to Visual Studio and says "JavaScript critical error at line 32, column 17." The error just says:

function onclick(event)
{
javascript:void()
}

If I change the url to www.google.com instead, Google loads with "Your client issued a request that was too large. That’s all we know." Does anyone know why this might be happening? If I create a regular LinkButton control and set an OnClick event to Response.Redirect("http://www.newegg.com") it works just fine.

Related posts

Recent Viewed