Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Using jpg added as an item to the project

Using jpg added as an item to the project

Scheduled Pinned Locked Moved ASP.NET
questiondesignhardwarelearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    israeli
    wrote on last edited by
    #1

    Hi, I'm trying to use an image file that was added to the project as an object as follows: Project --> Add existing item --> [Adding MyPic.jpg file to the project] Now the image file is an item within the project but what can I do with it? I guess it's possible to declair an image control to refer to this file (System.Web.UI.Image I= [what?] ) but I can't see how can I refer it? What's the difference between the properties of this item : None,Content,Compile,Embedded resource ? Can I erase the image file from my hard disk after I'm setting 'Compile' or 'Embedded resource' and still the picture appear ? Thanks

    M 1 Reply Last reply
    0
    • I israeli

      Hi, I'm trying to use an image file that was added to the project as an object as follows: Project --> Add existing item --> [Adding MyPic.jpg file to the project] Now the image file is an item within the project but what can I do with it? I guess it's possible to declair an image control to refer to this file (System.Web.UI.Image I= [what?] ) but I can't see how can I refer it? What's the difference between the properties of this item : None,Content,Compile,Embedded resource ? Can I erase the image file from my hard disk after I'm setting 'Compile' or 'Embedded resource' and still the picture appear ? Thanks

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      israeli wrote:

      but I can't see how can I refer it?

      You simply specify the URL of the image in the ImageUrl property of the Image control, you can also use the ellipsis button in the Properties window to locate the image. For more information, you can see: Adding Image Web Server Controls to a Web Forms Page[^]

      israeli wrote:

      What's the difference between the properties of this item : None,Content,Compile,Embedded resource ? Can I erase the image file from my hard disk after I'm setting 'Compile' or 'Embedded resource' and still the picture appear ?

      You'd better check out the BuildAction property[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups