Solved

Server.Execute not working?

Posted on 2001-06-05
8
540 Views
Last Modified: 2007-11-27
myfile = "product_form.asp?mode=add"
Server.Execute(myfile)

the above code giving error:

Error Type:
Server object, ASP 0231 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative URLs.

pls help me! thanks a lot!





0
Comment
Question by:khongkham
8 Comments
 
LVL 2

Expert Comment

by:cybermoonlight
ID: 6155551
You can't pass dynamic values with server.execute, so you cqan't pass a querystring
Online documentation is wrong..plz follow this link to what MS has to say:
http://support.microsoft.com/support/kb/articles/Q247/4/20.asp

There you go
0
 

Author Comment

by:khongkham
ID: 6155591
then, what's the correct method to pass the mode value???
0
 
LVL 22

Accepted Solution

by:
CJ_S earned 100 total points
ID: 6155601
Instead use
Response.Redirect myfile
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 2

Expert Comment

by:enkay022798
ID: 6155677
YOu cannot pass arguments to a file being executed through the Server.Execute method. The querystring of the calling file is available inside the the file being called.

so if inside a.asp?xyz=1

you say Server.Execute(thisfile.asp) then inside of thisfile.asp you can say
Request("xyz") and it will return 1

0
 
LVL 2

Expert Comment

by:cybermoonlight
ID: 6155681
.execute excutes the contents of a page in another page (much like calling a function) so using response.redirect might not be the way. depending on how you are formatting.
could you explain a little more as to what ur tryinmg to acheive?
thx
0
 
LVL 7

Expert Comment

by:TheNige
ID: 6158331
Continue to use the server.execute method....but leave off the querystring variables... instead create a local variable before doing the server.execute....your "product_form.asp" will then have access to that variable.

example...

mode="add"
Server.Execute("product_form.asp")

now in your product_form.asp you can use the "mode" variable without doing anything like Request.Querystring...just use the variable as if you were in the origional page

hope that helps
0
 

Expert Comment

by:nesifa
ID: 6165454
Are you working with asp2.0 or asp 3.0
Asp 2.0 does not support this method. It is supported on asp 3.0.
Hope it helps finds the error.

Thanks
0
 
LVL 2

Expert Comment

by:cybermoonlight
ID: 6169454
May i just comment that response.Redirect is not an altewrnative of server.execute..server.execute executes a page as if it were part of the original page..just like a subroutine..
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Classic ASP application Will support SQL 2014 5 94
Problems using Provider=OraOLEDB.Oracle via VBScript/Classic ASP 5 85
Weighted Randomizing 6 30
Asp in script 6 36
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question