?
Solved

Server.Execute not working?

Posted on 2001-06-05
8
Medium Priority
?
576 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 200 total points
ID: 6155601
Instead use
Response.Redirect myfile
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
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…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 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