IE would not display any images...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • athar258
    New Member
    • May 2009
    • 20

    IE would not display any images...

    Hey everyone..
    I am facing a strange problem right at the start of my project.
    I am developing an asp.net application using visual web developer 2005. I have a panel in which i have set a background image. when i run the project the image would not display in the panel, instead if i set the backColor property to say red, the panel filled with red color is displayed but not the image.
    i have tried an image box also, but the problems persists.
    i have only started the project, and literally thats the only code i have got so far, no complication code nothing, thats why i hope i dont need to copy any code here, however if any body wants it, i will get u whatever line of codes i have.

    any help is highly appreciated.
    thanks.
  • athar258
    New Member
    • May 2009
    • 20

    #2
    just one more thing... the images are displayed in the VWD designer...

    Comment

    • tlhintoq
      Recognized Expert Specialist
      • Mar 2008
      • 3532

      #3
      Are you loading the image from a path? Maybe the path is bad

      Comment

      • athar258
        New Member
        • May 2009
        • 20

        #4
        no man..i aint doing anything fancy..i simply in the panle properties, set the imageURLPath as the picture i have in the App_Data folder..thats all.. it shows the picture in the designer but not in the explorer...
        there is not even any code that i could quote you here...:D

        Comment

        • tlhintoq
          Recognized Expert Specialist
          • Mar 2008
          • 3532

          #5
          I am getting out of my area as this is a webapp not a Windows Forms app but...
          When you build for release or debug, isn't the location of the Application folder changing to ...\\{solution} \{project}\bin\ release\
          and thus the subdirectory of App_Data is no longer valid from the point of view of the executable (assuming of course that it is a relative not fixed path)

          Thus it is correct relative to the app when in designer, but when the exe is built in a different folder the graphics aren't in the same relative location?

          Comment

          • athar258
            New Member
            • May 2009
            • 20

            #6
            tlhintoq,
            yes it is a webapp.. and i dont think that the application folder changes to any other location on build..and the the images and other resources remain in the App_Data folder..

            it would be great if you kindly elaborate your point..

            Comment

            • Frinavale
              Recognized Expert Expert
              • Oct 2006
              • 9749

              #7
              Move the images out of the AppData folder.

              The AppData folder is meant to contain things like database files etc...not images.

              Place the images into a "images" folder in your website. That way you can use relative URIs to access them in your CSS styles.

              -Frinny

              Comment

              • athar258
                New Member
                • May 2009
                • 20

                #8
                Frinvale
                thats solves my problem mate..thanks very very much...but could you kindly elaborate a little further that why it loads the image from the Image folder and does not from App_Data folder??

                again a big thanks mate..:)

                Comment

                • Frinavale
                  Recognized Expert Expert
                  • Oct 2006
                  • 9749

                  #9
                  I'm not entirely sure why you can't use the AppData folder....

                  I mean, one would think that it is a folder that's sitting in the Website and that the HTML should be able to access it....but that's just not the case.

                  I could guess that it might have something to do with permissions. It could be that it is not accessible from the HTML because it needs to be accessed via your code....

                  I'm really not sure, sorry.

                  I just know that you cannot store the website's typical resources (like images, CSS files, JavaScript files, etc) in the AppData director. It's really meant to be used for storing embedded databases etc.

                  -Frinny

                  Comment

                  • petermankge858
                    New Member
                    • Mar 2014
                    • 1

                    #10
                    IE would not display any images...

                    Was getting the same problem whereby I can't see images in the header, what I've learned is that .jpg images are too big in size when using IE so I converted my images to .gif as this consumes less memory size and it was working perfect.

                    Comment

                    Working...