Solved

Server.Execute not working?

Posted on 2001-06-05
8
507 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
 
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now