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. Images not getting displayed

Images not getting displayed

Scheduled Pinned Locked Moved ASP.NET
databasesysadmin
7 Posts 4 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.
  • S Offline
    S Offline
    scar_face
    wrote on last edited by
    #1

    Hi, I am trying to load images in my login page,but they are not getting displayed.I am also using image button for images of submit and reset.Tried using ~ but still not getting displayed.

    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/img snip.jpg" Style="z-index: 100;left: 78px; position: absolute;
    top: 189px" AlternateText="img" />

    scarface

    A S C 3 Replies Last reply
    0
    • S scar_face

      Hi, I am trying to load images in my login page,but they are not getting displayed.I am also using image button for images of submit and reset.Tried using ~ but still not getting displayed.

      <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/img snip.jpg" Style="z-index: 100;left: 78px; position: absolute;
      top: 189px" AlternateText="img" />

      scarface

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      scar_face wrote:

      am trying to load images in my login page,but they are not getting displayed

      Check your image path is valid or not !!

      cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net

      1 Reply Last reply
      0
      • S scar_face

        Hi, I am trying to load images in my login page,but they are not getting displayed.I am also using image button for images of submit and reset.Tried using ~ but still not getting displayed.

        <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/img snip.jpg" Style="z-index: 100;left: 78px; position: absolute;
        top: 189px" AlternateText="img" />

        scarface

        S Offline
        S Offline
        saanj
        wrote on last edited by
        #3

        Right click on the cross image and check the path which is it taking. You can also view the source and check the path from which the image is mapped. It is preferred to set the image path dynamically in the code-behind with the fully qualified virtual path like shown below: img1.Src = "http://localhost/demoapp/images/img\_bak.gif"; Regards Saanj

        Either you love IT or leave IT...

        S 1 Reply Last reply
        0
        • S scar_face

          Hi, I am trying to load images in my login page,but they are not getting displayed.I am also using image button for images of submit and reset.Tried using ~ but still not getting displayed.

          <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/img snip.jpg" Style="z-index: 100;left: 78px; position: absolute;
          top: 189px" AlternateText="img" />

          scarface

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Is it possible that only logged in members have permission to view these images ?

          Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

          S 1 Reply Last reply
          0
          • C Christian Graus

            Is it possible that only logged in members have permission to view these images ?

            Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp

            S Offline
            S Offline
            scar_face
            wrote on last edited by
            #5

            thanks christian.. i think thats the reason..checking on it..

            scarface

            1 Reply Last reply
            0
            • S saanj

              Right click on the cross image and check the path which is it taking. You can also view the source and check the path from which the image is mapped. It is preferred to set the image path dynamically in the code-behind with the fully qualified virtual path like shown below: img1.Src = "http://localhost/demoapp/images/img\_bak.gif"; Regards Saanj

              Either you love IT or leave IT...

              S Offline
              S Offline
              scar_face
              wrote on last edited by
              #6

              i had tried givin that path but it dint work ..

              scarface

              S 1 Reply Last reply
              0
              • S scar_face

                i had tried givin that path but it dint work ..

                scarface

                S Offline
                S Offline
                saanj
                wrote on last edited by
                #7

                You have to remove the image path from the image definition in aspx as well. Try to check what is the image url (virtual path) and then paste it into that code. Are you trying it in your localhost or somewhere else? If it is not in localhost then permission can be an issue. Just paste image path that you are specifying in the code, in the browser and check manually whether the image is getting displayed or not.

                There is no foolish question, there is no final answer...

                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