Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running an Asp page from within another!?

Status
Not open for further replies.

mobius1983

Technical User
Jul 7, 2002
45
GB
Hi everyone,

i am not sure if you can do this or not, I have a pretty bit asp page. In the middle of the page in a loop i need to get it to run another asp page using the variables the loop is providing. The problem is because this script is doing more than one function I cant leave the page and come back. Is there any way I can get my script to run the asp page without actually physically opening it?

Thanks very much to anyone that can help

Thanks
Nick.
 
Thanks for the responses.

The trouble is the script is too big to add any more includes or code to because I have trouble with it timing out at the moment.
And the company's server doesnt support server.excecute

Is there anything else I can try?

Thanks again

Nick.
 
You could shorten your script :)

Even if Server.Execute was available, it would still wait for te execution before being able to go on. There is no auto-magical way to run a script and have the amount of time it was running not count (at least not that i know of), unless your looking to have the script run once a day and cache the reults to a local file or something like that.

I'm curious what your doing that would cause the script to go over the default timeout though(90 seconds), but if necessary you could always increase it to 10 minutes. Server.ScriptTimeout = 600

You may want to look into some of the optimization FAQs and do some searchs on optimizing code from the search tab above. I can't imagine how much data you must be manipulating to get that kind of load time, but I know I have written code in the past to grab 4000+ records from a database (with various mathematics in query) and output the data to a page, and half or more fo the load time is simply the browser trying to draw the load of junk ot the screen, server usually its in at under 10-20 seconds...maybe less, my memory is failing me at the moment.

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Hiya,

I have managed to refine my problem!
My script runs, but in the middle of a loop I need to open a page on a different server, once for everytime the loop runs with the variables the loop holds. I am trying to keep all the code server-side, which stops me from opening another window or changing the source of a frame.

The code on the other page kicks off a whole different process to send a text message so i can not include it in my current page.

I am in a bit of a bind if anyone can help.

Cheers
Nick
 
No threading in std ASP unfortunatly...hmm..You could create a DLL to do the text messaging witha little threading in it. Have the instantiator of the DLL (Sub New) kick off the thread tat would actually send the message. This way your ASP app keeps chugging on along and the DLL operates asynchronously.

You wouldn't know if the message successfully sent or not, but then I cannot think of any way to send the message asynchronously and know if it was successful or not.

Actually, XMLHTTP has an asynchronous mnethod of operating built in...sao you could use XMLHTTP to open the website doing your text message stuff, but before opening do a XMLHTTP.Async = True. You won't know when the script has finished executing or what the results was (unless you keep the object referenced in a variable and chek on it later on, like as the last thing you do before finishing your main page) but at the same tme it will operat at it's own speed independant of the running script...that may actually be your solution (if it is supported on your server).

-T

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
The never-completed website:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top