Results 1 to 8 of 8

Thread: QueryString

  1. #1
    chenko
    Guest

    QueryString

    I want to send this "sub.asp?id=2" in a QueryString

    but path.asp?sub.asp?id=2 wont work

    how can I get around this?

  2. #2
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    URLEncode it.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  3. #3
    chenko
    Guest
    and how would I do that? whats the code for "?" and "=" ??

  4. #4
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    In ASP:

    VB Code:
    1. Server.URLEncode("Whatever")
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  5. #5
    Lively Member harsoni's Avatar
    Join Date
    Oct 2000
    Posts
    118

    Lightbulb

    if you trying to pass "path.asp?sub.asp?id=2" then try using a dilimitar like "path.asp*sub.asp*id=2 "

    Sonia

  6. #6
    chenko
    Guest
    Well I found that

    path.asp?sub.asp?id=2

    returns sub.asp?id=2 because there is a ? and not a & which would split it up

    my problem is the Varible that im storing it in seams to empty halfway thru my code

  7. #7
    Lively Member
    Join Date
    Jan 2001
    Posts
    118
    I got a work around for what you want to do. (I don't think what you want to do is possible)... but

    path.asp?ID=2&Page=PageName.asp

    Now you can retrieve the ID and the Page.

    And on the page that you catch this variables...

    Response.redirect (pageName.asp)

    So now you can have 1 page (to do the work) and redirect to multi pages.

    I did this because : Want 1 page that will display multiple messages like 'Updated suceeded'. So I have my response.page (to do all the work)... and just redirect to the that message page with the message and file to redirect to.

  8. #8
    chenko
    Guest
    Well there might be more querystrings, there might be none, so that would be unpractical....as I say mine works for now, Im going to use * as a delimiter as when i need more than one querystring I will have problems



    Im having another problem at the moment :/

    "Microsoft JET Database Engine error '80004005'

    Disk or network error.

    /simon/asp/newreply.asp, line 33 "


    It stops at the line

    "CN.Open CONNECTION_STRING"

    CONNECTION_STRING = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=" & DATABASE_PATH
    and
    DATABASE_PATH = "c:\inetpub\wwwroot\simon\asp\db\sub.mdb"

    This error has just appeared now Ideas?

Posting Permissions

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



Click Here to Expand Forum to Full Width