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. Read URL from an Internet Shortcut file

Read URL from an Internet Shortcut file

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettutorialquestion
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.
  • S Offline
    S Offline
    Subrahmanyam K
    wrote on last edited by
    #1

    Hi, How to extract the URL from an Internet Shortcut (.url) file in ASP.NET/C#? What are the namespaces and classes required to read the information from a ".URL" file? Thanks in advance. Subrahmanyam K

    S 1 Reply Last reply
    0
    • S Subrahmanyam K

      Hi, How to extract the URL from an Internet Shortcut (.url) file in ASP.NET/C#? What are the namespaces and classes required to read the information from a ".URL" file? Thanks in advance. Subrahmanyam K

      S Offline
      S Offline
      Sebastien Lachance
      wrote on last edited by
      #2

      I can recommend you 2 things. First the really hard way :P http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp[^] Second, you can open the file and get all the content of the url file. Like this : using (FileStream fs = File.OpenRead(filename)) { byte[] b = new byte[1024]; UTF8Encoding temp = new UTF8Encoding(true); while (fs.Read(b, 0, b.Length) > 0) { string content = temp.GetString(b); } } Then you will probably be able to get it with a regular expression. My Blog -- modified at 9:55 Monday 10th July, 2006

      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