Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Apr 2006
    Posts
    31
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Getting code out of url

    Hi Everyone!

    I have url:

    http://www.somesite.com/folder/folder/80/webpage.asp

    I have a form that uses dynamic content to populate a list from a database. There are 10 different lists. At the beginning of the form, you need to manually enter 80 so it pulls from the correct database. Is there a way I can automate this on the page?

    -----------------------
    value="

    <%

    Code that gets 80 out of the url

    %>

    "
    -----------------------

    Any help would be greatly appreciated!

  • #2
    New Coder
    Join Date
    Apr 2006
    Posts
    31
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Also, if there is an easier way to do this, please let me know.

  • #3
    Regular Coder
    Join Date
    Sep 2007
    Posts
    120
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Dim a, fld

    a = Split("http://www.somesite.com/folder/folder/80/webpage.asp", "/")
    fld = a(UBound(a)-2)

    HTH, Tom

  • #4
    New Coder
    Join Date
    Sep 2007
    Location
    India
    Posts
    72
    Thanks
    1
    Thanked 2 Times in 2 Posts
    You can get the URL using
    Request.ServerVariables("PATH_INFO")
    if this would help you
    - Developer from India

    Firefox 2.0


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •