not able to view any of the images

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Adela Arpitha
    New Member
    • Jan 2008
    • 15

    not able to view any of the images

    Hello Sir/Madam
    I am doing a project using asp.net 1.1 as the front end. I very recently upgraded my browser from internet explorer 6 to internet explorer 7. since then when i execute my program i am not able to view any of the images which i have used in my design page, though the images in the design page are intact and visible. Please let me know wt changes should i make so that my project works well with all kind of browsers.....pl ease help.
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    Originally posted by Adela Arpitha
    Hello Sir/Madam
    I am doing a project using asp.net 1.1 as the front end. I very recently upgraded my browser from internet explorer 6 to internet explorer 7. since then when i execute my program i am not able to view any of the images which i have used in my design page, though the images in the design page are intact and visible. Please let me know wt changes should i make so that my project works well with all kind of browsers.....pl ease help.
    Please post your html code that you're using to display your images.
    (remember to use [code] tags when posting code snippets)

    -Frinny

    Comment

    • Adela Arpitha
      New Member
      • Jan 2008
      • 15

      #3
      Originally posted by Frinavale
      Please post your html code that you're using to display your images.
      (remember to use [code] tags when posting code snippets)

      -Frinny

      Hello,
      this is (one of ) the html code for the image(s)
      <asp:imagebutto n id="ImageButton 9" style="Z-INDEX: 113; LEFT: 376px; POSITION: absolute; TOP: 144px" runat="server" ImageUrl="file:///F:\My project\ICONS\m ascot background2.jpg " Width="868px" Height="136px">

      it was working fine but the images are not appearing on the executed screen after upgrading my browser to IE-7.

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        Are you using IIS? This file location business is the problem.
        Originally posted by Adela Arpitha
        Hello,
        this is (one of ) the html code for the image(s)
        <asp:imagebutto n id="ImageButton 9" style="Z-INDEX: 113; LEFT: 376px; POSITION: absolute; TOP: 144px" runat="server" ImageUrl="file:///F:\My project\ICONS\m ascot background2.jpg " Width="868px" Height="136px">

        it was working fine but the images are not appearing on the executed screen after upgrading my browser to IE-7.

        Comment

        • Frinavale
          Recognized Expert Expert
          • Oct 2006
          • 9749

          #5
          Originally posted by Adela Arpitha
          Hello,
          this is (one of ) the html code for the image(s)
          <asp:imagebutto n id="ImageButton 9" style="Z-INDEX: 113; LEFT: 376px; POSITION: absolute; TOP: 144px" runat="server" ImageUrl="file:///F:\My project\ICONS\m ascot background2.jpg " Width="868px" Height="136px">

          it was working fine but the images are not appearing on the executed screen after upgrading my browser to IE-7.
          Kenobewan's right.
          Your ImageUrl should be point to a location on your IIS server, not directly accessing the file.

          It should be something like:

          <asp:imagebutto n id="ImageButton 9" runat="server" ImageUrl="~/Images/mascot background2.jpg " Width="868px" Height="136px">

          Where ~/Images/ is a folder located within the root directory of your asp application.

          -Frinny

          Comment

          • Adela Arpitha
            New Member
            • Jan 2008
            • 15

            #6
            Originally posted by kenobewan
            Are you using IIS? This file location business is the problem.
            Thanks Kenobewan,
            ur right, i had forgot abt it. now i will change it to the proper folder within the root directory as Frinny said...and i think it shud work. Thanks so much.

            Comment

            • Adela Arpitha
              New Member
              • Jan 2008
              • 15

              #7
              Originally posted by Frinavale
              Kenobewan's right.
              Your ImageUrl should be point to a location on your IIS server, not directly accessing the file.

              It should be something like:

              <asp:imagebutto n id="ImageButton 9" runat="server" ImageUrl="~/Images/mascot background2.jpg " Width="868px" Height="136px">

              Where ~/Images/ is a folder located within the root directory of your asp application.

              -Frinny
              Hi Frinny,
              thanks so much u got it right i had forgot abt it...i had forgot to take the path from the root directory....so if i change it this way are u sure my images will be visible no matter which browser is used or upgraded. Thank u very much.

              Comment

              • Frinavale
                Recognized Expert Expert
                • Oct 2006
                • 9749

                #8
                Originally posted by Adela Arpitha
                Hi Frinny,
                thanks so much u got it right i had forgot abt it...i had forgot to take the path from the root directory....so if i change it this way are u sure my images will be visible no matter which browser is used or upgraded. Thank u very much.
                I've never had a problem with it: )
                Give it a try and let me know if it worked for you.

                Comment

                • Adela Arpitha
                  New Member
                  • Jan 2008
                  • 15

                  #9
                  Originally posted by Frinavale
                  I've never had a problem with it: )
                  Give it a try and let me know if it worked for you.
                  Hi Frinny,
                  im in problem again, it is stil not working im actually surprised.
                  i gave the image url (path) as ImageUrl="file:///C:\images\masco t.jpg it din work these are the other options i tried
                  ImageUrl="file:///C:\Inetpub\imag es\mascot.jpg">
                  ImageUrl="file:///C:\Inetpub\wwwr oot\images\masc ot.jpg">
                  i also removed the older image ctrl button and replaced it with a new one .....
                  but stil no change. :-(
                  i tried it with a new webapplication taking an image ctrl and its working fine but i donno wts the problem here.
                  .jpg, .gif, these are the formats which i have used. those were my project images, now im worried how will i show it to my project manager. I wonder if the problem is with the file format........

                  the image url path of the other image which is working fine is
                  ImageUrl="file:///C:\Documents and Settings\Adela\ My Documents\face the naighbour.bmp
                  if i use any one of the above paths it isn't working

                  Comment

                  • Frinavale
                    Recognized Expert Expert
                    • Oct 2006
                    • 9749

                    #10
                    Originally posted by Adela Arpitha
                    Hi Frinny,
                    im in problem again, it is stil not working im actually surprised.
                    i gave the image url (path) as ImageUrl="file:///C:\images\masco t.jpg it din work these are the other options i tried
                    ImageUrl="file:///C:\Inetpub\imag es\mascot.jpg">
                    ImageUrl="file:///C:\Inetpub\wwwr oot\images\masc ot.jpg">
                    i also removed the older image ctrl button and replaced it with a new one .....
                    but stil no change. :-(
                    i tried it with a new webapplication taking an image ctrl and its working fine but i donno wts the problem here.
                    .jpg, .gif, these are the formats which i have used. those were my project images, now im worried how will i show it to my project manager. I wonder if the problem is with the file format........

                    the image url path of the other image which is working fine is
                    ImageUrl="file:///C:\Documents and Settings\Adela\ My Documents\face the naighbour.bmp
                    if i use any one of the above paths it isn't working
                    You are still not properly assigning the ImageURL.

                    "file:///C:\Inetpub\imag es\mascot.jpg" is not a valid URL.

                    "www.mysite/images/mascot.jpg" is a valid URL.

                    Right now you are trying to access the picture from the C:\ directory but the IIS doesn't work like that. The IIS is set up to work with virtual directories in order to serve web pages and images to your web browser. Therefore you have to provide a valid URL to the ImageUrl property not a path to the file on the computer.

                    You don't even need to include www.mysite in the url, you can reference it by using relative paths. So if you have a folder named "images" in the root of your web site directory, the URL for the picture would be:

                    "~/images/mascot.jpg"

                    This is a valid URL that the IIS (web server) can use to locate the picture so that the web browser can load it.

                    Does this make sense?

                    -Frinny

                    Comment

                    • Adela Arpitha
                      New Member
                      • Jan 2008
                      • 15

                      #11
                      hello Frinny,
                      Thanks so much for the explaination. im actually building this website for intranet purpose. So i will check with the company's system admin...for the particular location.
                      The thing was i was wondering how it was working fine with IE 6 and with the .bmp image in IE 7!!!!

                      thanks again Frinny.

                      Comment

                      Working...