Solved

Server.Execute not working?

Posted on 2001-06-05
8
547 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Downside of adding characters set in ASP pages 6 36
Cannot open file from ASP if user is "logged in" 13 32
If condition on Html with Asp 11 40
Replace value 2 31
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

756 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