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?
Printable View
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?
URLEncode it.
and how would I do that? whats the code for "?" and "=" ??
In ASP:
VB Code:
Server.URLEncode("Whatever")
if you trying to pass "path.asp?sub.asp?id=2" then try using a dilimitar like "path.asp*sub.asp*id=2 "
Sonia:rolleyes:
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 :confused:
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.
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?