FireFox replace \ with %5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Alex3martin
    New Member
    • Nov 2006
    • 1

    FireFox replace \ with %5

    Hello, Im using .net c#

    I having some problems using firefox to display an image in a server.

    Well I'm using an image.imageUrl = "C:\image.j pg" to dipslay the image.

    IE works fine, but Firefox, it doesnt, I check the source and replace the \ with the %5, i tried to used anything but it doesnt :(

    Any sugestion

    Thanks
  • vzdesic
    New Member
    • Jan 2007
    • 1

    #2
    I have the same problem. Did you find the solution in a meantime?
    Vedran

    Comment

    • enreil
      New Member
      • Jan 2007
      • 86

      #3
      Try image.imageUrl = "file:///C:/image.jpg"

      Originally posted by Alex3martin
      Hello, Im using .net c#

      I having some problems using firefox to display an image in a server.

      Well I'm using an image.imageUrl = "C:\image.j pg" to dipslay the image.

      IE works fine, but Firefox, it doesnt, I check the source and replace the \ with the %5, i tried to used anything but it doesnt :(

      Any sugestion

      Thanks

      Comment

      • enreil
        New Member
        • Jan 2007
        • 86

        #4
        Sorry for the double post - I just thought of something else. The "\" is a special character in C#. Whenever you want to use it as a literal (such as in a file path) you should escape it with another "\". Your path should be "C:\\image.jpg" . Alternatively, you can do @"C:\image.jpg" . Either will work.

        Originally posted by Alex3martin
        Hello, Im using .net c#

        I having some problems using firefox to display an image in a server.

        Well I'm using an image.imageUrl = "C:\image.j pg" to dipslay the image.

        IE works fine, but Firefox, it doesnt, I check the source and replace the \ with the %5, i tried to used anything but it doesnt :(

        Any sugestion

        Thanks

        Comment

        Working...