http request

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SmFtZXMgUGFnZQ==?=

    http request

    A quick question:
    How do I retrieve the file name from the two URLs's:

    or


    using the request object.

    What I need is a simple way of returning the 'file.aspx'.

    I've looked at request.url.seg ements() but this needs to specific to a
    segement
    In my case i need to extract the filename from any depth of url.

    Any help would be appreciated - VB.net 3.5 please.

    Thanks
  • John

    #2
    Re: http request


    Hi James,

    Try this
    System.IO.Path. GetFileName(Req uest.Url.ToStri ng());

    Regards,
    John


    On Sep 19, 8:14 am, James Page <JamesP...@disc ussions.microso ft.com>
    wrote:
    A quick question:
    How do I retrieve the file name from the two URLs's:www.mysite.com/file.aspx
    orwww.mysite.co m/folder/file.aspx
    >
    using the request object.
    >
    What I need is a simple way of returning the 'file.aspx'.
    >
    I've looked at request.url.seg ements() but this needs to specific to a  
    segement
    In my case i need to extract the filename from any depth of url.
    >
    Any help would be appreciated - VB.net 3.5 please.
    >
    Thanks

    Comment

    • =?Utf-8?B?SmFtZXMgUGFnZQ==?=

      #3
      Re: http request

      Works great.

      Thank you very much


      "John" wrote:
      >
      Hi James,
      >
      Try this
      System.IO.Path. GetFileName(Req uest.Url.ToStri ng());
      >
      Regards,
      John
      >
      >
      On Sep 19, 8:14 am, James Page <JamesP...@disc ussions.microso ft.com>
      wrote:
      A quick question:
      How do I retrieve the file name from the two URLs's:www.mysite.com/file.aspx
      orwww.mysite.co m/folder/file.aspx

      using the request object.

      What I need is a simple way of returning the 'file.aspx'.

      I've looked at request.url.seg ements() but this needs to specific to a
      segement
      In my case i need to extract the filename from any depth of url.

      Any help would be appreciated - VB.net 3.5 please.

      Thanks
      >
      >

      Comment

      Working...