Link to home
Start Free TrialLog in
Avatar of allanmark
allanmark

asked on

Web button with image added via source - image not displayed in browser

Greteings

I have a page with various button(s) - the default ASP.NET button!. The ASP source has been modified to add an image via teh background-image property. This appears to work fine - button shows with image , in designer. When I "View in Browser" ther is NO image displayed. What gives? What do I need to do?

My source:

   <asp:Panel ID="Panel1" runat="server" BorderStyle="Outset" BorderWidth="2px" Height="50px"
        Width="930px">
        <asp:Button ID="btnInsert" runat="server" Text="   Insert" Width="85px"
             Style="text-align: center; background-repeat: no-repeat; background-image: url(D:/School_Keeper_ASP/Images/insert.bmp); background-position:left center;
             right: 846px; position: absolute; top: 474px" />
        &nbsp;      
        <asp:Button ID="btnCancel" runat="server" Text="   Cancel" Width="85px"
             Style="text-align: center; background-repeat: no-repeat; background-image: url(D:/School_Keeper_ASP/Images/cancel.bmp); background-position:left center;
             left: 396px; position: absolute; top: 472px" />
    </asp:Panel>


Avatar of LordPhoenix
LordPhoenix

Your urls for the images start with D:/ (and thus file system based) and i am sure the browser is having issues with that. Please make sure the urls are either relative or absolute web paths. I hope that helps.
in the browser
right click on the image broken and see the property and see what path that broken image is getting...so that you can see why your image is broke.
ASKER CERTIFIED SOLUTION
Avatar of Rejojohny
Rejojohny
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of allanmark

ASKER

To everyone, thanks for your help!!

Rejojohny - spot on !!