server.execute("file.asp") Code (markup): That executes the file file.asp. But how do i execute file.asp?count=10 Anyone?
try strCount=10 server.execute("file.asp") strCount="" in file.asp dont request("count") just write strCount Good Luck
gulliver, server.execute doesn't work quite that way. when server.execute executes an external page, it executes it as a stand-alone page with its own set of variables. local variables assigned on the "container" page don't affect the environment of the "executed" page. but your solution is VERY close. in fact, you can do this with one teensy modification to your suggested container page code: instead of FILT, you should try this instead: session("strCount")=10 server.execute("file.asp") session("strCount")="" Code (markup): This will define a session variable, which you will find will be retrieved with no problems on the executed page. FILT, this code should work great for you. jsut remember that instead of referencing it via the request("count") method on file.asp, simply call the session variable session("strCount") in its place. should work fantastic. By the way, we're doing this sort of work-around because server.execute has difficulty with querystrings, in answer to your initial question on this thread. Hope this helps VG
Welcome back VG, haven't seen you for a while. Actually GULLIVER is my best friend and I was the one to suggest him to post it in ASP As always you know more than I, I have to try harder man
Thanks ludwig, i've been around - but i haven't posted that much lately. heck i haven't even updated my own blog in over a month As for my knowledge with server.execute, i really don't know all that much about it - other than i had a job a few years back where i needed to use it and ran into the EXACT situation that Filt is describing, where i was unsuccessfully trying to execute a page with a querystring. This (or something like this) was my solution then. Actually that's not entirely true, my solution then was probably alot less elegant I'm embarassed by the code i was writing 4 years ago hehe lataz VG
You can't use a querystring with Server.Execute either. That's why one of the posters above told you to store your querystring information in a variable, and then have the page you are executing access that variable. It would work the same way with an include, except the code would be included before runtime instead of during runtime, so it would probably be slightly faster.