Click here to Skip to main content
15,891,672 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
<pre lang="xml"><%@ Page Language="C#" AutoEventWireup="true" CodeFile="Expt_Image2.aspx.cs" Inherits="Expt_Image2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <asp:Image ID="Image1" runat="server" ImageUrl="~/Image/Bluehills.jpg" Height="100" Width="100"/>
           <asp:Image ID="Image2" runat="server" ImageUrl="C:\Documents and Settings\Lovey\My Documents\Visual Studio 2008\WebSites\Expt-New\Image\Sunset.jpg" Height="100" Width="100"/>
    </div>
    </form>
</body>
</html>




In this first image is displayed not second why?
Posted

1 solution

Because your second path is a local file path and not a Url. You should really use Urls.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900