how to show image

  1. #1

    how to show image

    hello all

    I want to show one image on form but its not showing with followin code. can someone tell how to do it.

    <ext:Image ID="ExpandImage" runat="server" Visible="true" ImageUrl="C:/UploadedImages/Dock.jpg">
    </ext:Image>
    it is showing following image

    Click image for larger version. 

Name:	image.jpg 
Views:	117 
Size:	64.6 KB 
ID:	1389

    i am not getting that if the image is no not aviliable or image format is not supported.

    Thanks and Regards
    Harshad
    Last edited by geoffrey.mcgill; Jul 19, 2010 at 6:22 PM. Reason: please use [code] tags
  2. #2
    Using a direct local c:/ file path the image file is probably not going to work, especially once deployed to a web server.

    You need to pass a path relative to the current Page file, or the web application root.

    Something like the following.

    Example

    ImageUrl="/UploadedImages/Dock.jpg" // Relative to Virtual Root
    
    or 
    
    ImageUrl="../UploadedImages/Dock.jpg" // Relative to Current Location
    
    or 
    
    ImageUrl="~/UploadedImages/Dock.jpg" // Relative to Web Application Root
    
    or
    
    ImageUrl="Dock.jpg" // Image in same directory as current file
    
    or 
    
    ImageUrl="http://www.example.com/UploadedImages/Dock.jpg" // Absolute http path
    Hope this helps.
    Last edited by geoffrey.mcgill; Jul 19, 2010 at 7:53 PM.
    Geoffrey McGill
    Founder

Similar Threads

  1. Show/Hide Image Command from Code behind
    By Nagaraj K Hebbar in forum 1.x Help
    Replies: 2
    Last Post: Nov 26, 2013, 7:22 PM
  2. upload an image and show it on page
    By Fabrizio in forum 1.x Help
    Replies: 3
    Last Post: Jun 16, 2012, 10:02 PM
  3. [CLOSED] ext:Image - How I can show a menu when click in ext:Image?
    By supera in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 10, 2012, 8:56 PM
  4. how to show Image
    By nysyzp in forum 1.x Help
    Replies: 2
    Last Post: Jan 30, 2012, 7:43 AM
  5. show a blob image in gridpanel
    By maxdiable in forum 1.x Help
    Replies: 2
    Last Post: Jul 22, 2009, 3:12 PM

Posting Permissions