No Image on IE browser when using Image Button or Button Field in Grid View

127 views Asked by At

Does anyone know why I'm encountering this issue using IE (all version) as browser? The image works perfectly on Chrome but not on IE.

Here is an example screenshot of what I'm talking about:

IE:

IE

And when I try this using Chrome it works as expected.

Chrome:

chrome

and here is the code I use which I also found on the Internet.

<asp:GridView ID="gvJobs" runat="server" OnRowCommand="gvJobs_RowCommand">
    <Columns>
        <%--<asp:ButtonField ButtonType="Image" CommandName="btnExtract_Click" ImageUrl="~/images/icons/ExcelLogo.png" CausesValidation="false" />--%>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:ImageButton ID="btnExtractId" AutoPostback="true" runat="server" 
                    ToolTip="Calibration Form" CommandName="btnExtract_Click" CausesValidation="false" ImageUrl="~/images/icons/ExcelLogo.png" /> 
            </ItemTemplate>
        </asp:TemplateField>
        <asp:HyperLinkField HeaderText="Job Reference" DataTextField="JobReference" DataNavigateUrlFields="JobId" DataNavigateUrlFormatString="job.aspx?jobid={0}" />
        <asp:BoundField HeaderText="Job Type" DataField="JobTypeName" />
        <asp:BoundField HeaderText="Business Unit" DataField="BusinessUnitName" />
        <asp:BoundField HeaderText="Client" DataField="ClientFullname" />           
        <asp:BoundField HeaderText="Planned Completion Date" DataField="PlannedCompletionDate" DataFormatString="{0:dd/MM/yyyy}" />
        <asp:HyperLinkField HeaderText="Parent Job" DataTextField="ParentJobReference" DataNavigateUrlFields="ParentJobId" DataNavigateUrlFormatString="job.aspx?jobid={0}" Visible="false" />
    </Columns>
</asp:GridView>

I already tried the two controls but still no luck on the issue. I also look for a solution on the Internet but it does not help me solve my problem.

Thanks in advance to someone who can help me.

1

There are 1 answers

8
Manoj Bhardwaj On

i have tried your code with static values and its working fine. you need to clear cache of internet Explorer i guess. or press ctrl + F5

Either its cached on chrome or IE also you need to check file exist or not after clearing cache.

here we go with the screenshot using your code. enter image description here

do let me know if you need any help