Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

One ASP.Net ImageButton not working in Chrome (but another is... and both work in IE 9)

One of my image buttons is not working in Chrome, but the other button is (they both work in IE 9):

Not working

<asp:ImageButton ID="lblCustomer" 
    ImageUrl="~/images/Customer.jpg" 
    runat="server" 
    onmouseover="this.src='images/Customer.jpg';" 
    onmouseout="this.src='images/Customer.jpg';" 
    AlternateText="Customer" 
    CausesValidation="false" 
    OnClick="ibtnCustomer_Click" 
    ToolTip="Customer" />

Working:

<asp:ImageButton ID="ibtnUnRegisteredVendor" 
    ImageUrl="images/VendorButton.jpg" 
    runat="server" 
    onmouseover="this.src='images/VendorButtonHover.jpg';" 
    onmouseout="this.src='images/VendorButton.jpg';" 
    AlternateText="Vendor" 
    CausesValidation="false" 
    OnClick="btnUnRegisteredProvider_Click" 
    ToolTip="" />

The Customer button is not clickable in Chrome.
Any idea why the Customer button would not work in Chrome?

Update:

The rendered HTML from Chrome is:

<div id="Customer" style="width: 100%; left: 5px;">
    <input type="image" name="Master$cphMainContent$lblCustomer" id="cphMainContent_lblCustomer" title="Customer" onmouseover="this.src=&#39;images/Customer.jpg&#39;;" onmouseout="this.src=&#39;images/Customer.jpg&#39;;" src="images/Customer.jpg" alt="Customer" />
</div>


<div id="VendorsButton">
  <input type="image" name="Master$cphMainContent$ibtnVendor" id="cphMainContent_ibtnVendor" title="Vendor log in, registration or access without registration" onmouseover="this.src=&#39;images/VendorsButtonHover.jpg&#39;;" onmouseout="this.src=&#39;images/VendorsButton.jpg&#39;;" src="images/VendorsButton.jpg" alt="Vendors" />
<div id="VendorFeaturesContainer">
like image 271
DNR Avatar asked Aug 13 '12 18:08

DNR


1 Answers

Probably because you have a different path to both of them. Try changing the first one's ImageUrl to "images/Customer.jpg"

like image 136
Phillip Schmidt Avatar answered Sep 29 '22 12:09

Phillip Schmidt