khongkham
asked on
Server.Execute not working?
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!
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!
ASKER
then, what's the correct method to pass the mode value???
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.as p) then inside of thisfile.asp you can say
Request("xyz") and it will return 1
so if inside a.asp?xyz=1
you say Server.Execute(thisfile.as
Request("xyz") and it will return 1
.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
could you explain a little more as to what ur tryinmg to acheive?
thx
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_fo rm.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
example...
mode="add"
Server.Execute("product_fo
now in your product_form.asp you can use the "mode" variable without doing anything like Request.Querystring...just
hope that helps
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
Asp 2.0 does not support this method. It is supported on asp 3.0.
Hope it helps finds the error.
Thanks
May i just comment that response.Redirect is not an altewrnative of server.execute..server.exe cute executes a page as if it were part of the original page..just like a subroutine..
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