Passing Parameters To Server.Execute Or #Include ?
I need to pass a static parameter to an included ASP file. I'm thinking about using this with a query string, but upon reflection I'm not sure how I can do this. For example:
---file start: FIRST.ASP ------
<%
Server.Execute("second.asp?a=1")
%>
<!--- ***** or ***** --->
<!-- #include file="second.asp?a=2" -->
-----file end: FIRST.ASP --------------
Now, if I do a Request.QueryString("a") in second.asp, is it performing a query on FIRST.ASP then? How can I retrieve the parameter?
View Replies
ADVERTISEMENT
I've been browsing this and a few other related newsgroups trying to get my head around this problem, and so far all the trails seem to go cold, without an acceptable solution being reached. I'm posting here because there seems to be a few MVP's knocking around, and if they dont know, then it's a safe bet nobody does.
I'm beginning to think that what I want to do is simply not possible - but i'll put it out there once more.
Here goes: I'm writing a content managaement system - and i'm making use of dynamic includes via the "read a text file" technique, and then substitiuting values into markers in the template. Code:
View Replies
View Related
I was just wondering if it's possible to do this type of action, the way i currently have it layed out, the system does not recognise the id variable?
IF NOT Recordset.EOF THEN
'Record Found
id=Recordset.Fields("Survey_Id")
%>
<!--#include file="quiz.asp?id=<%=id%>" -->
<%
ELSE
Response.Write("No survey found.")
END IF
View Replies
View Related
I've got an include file inside each page throughout my site. Inside this
include file I'm running server.execute to include other pages based on a
condition (userID).
The problem has two parts-
1) The CPU usage jumps up to 100%
2) The path for these include files is different according to the file that
is calling server.execute, resulting in an invalid path
I'm not sure the best way to go about this. Basically all I'm trying to do
is run server.execute from within an include file, regardless of where the
calling page is inside my site structure.
This will be running off of an IIS 5 box and is being tested with IIS 6.
View Replies
View Related
which one is better? why? if I use server.execute, I can run dynamic queries
like server.execute("A.asp?id="&request("id"))
But I cant do it if I use include method? what do you think about this ?
View Replies
View Related
I'm trying to use server.execute statement to include in an asp page another asp page with a parameter. That's because I've a parametric query in the second asp page and I have to pass the value
<% Server.Execute("result.asp?key=2") %>
I can't do it. That's the error message I get:
Server object, ASP 0231 (0x80004005)
Invalid URL form or fully-qualified absolute URL was used. Use relative
URLs
Maybe the method doesn't support a parametric URL? If so, how can I do?
View Replies
View Related
I have a problem with input parameter which has Decimal DataType. Stored procedure (SQL 2000) works but it rounds all
values off, i.e 5.555 input becomes 6 and 1.3 input becomes 1.
In table QTY has data type decimal(5) - precision(8) scale(3).
Please, suggest what's wrong with this:
newqty = Request.Form("quantity")
..........
cmd.Parameters.Append(cmd.CreateParameter("qty", adDecimal, adParamInput, 5, newqty))
cmd.Parameters("qty").Precision = 8
cmd.Parameters("qty").NumericScale = 3
View Replies
View Related
I'm building my asp page using a table. Part of building that table includes:
......
Response.Write("<td>" & rsi.fields(3).value & "</td>")
Response.Write("<td><input type=button value=""Remove"" name=RemoveButton onclick=""RemoveAgent();""></td></tr>")
......
......
My problem is that my table has multiple records each line has a Remove button at the end. I need to pass rsi.fields(0).value to the RemoveAgent routine when the button is pressed.
I thought that my onclick event would become........onclick=""RemoveAgent(rsi.fields(0).value) ;.......
but I receive a syntax error. Thinking about it it's a bit more complex than that in any case because at the point of clicking the button, I am not sitting on the correct record within the recordset since I am sitting at the eof after creating the table
View Replies
View Related
I want to pass parameters via response.redirect.
After a search on google, I have seen various types and i am getting confused on the best way to do it.Can someone let me know if i can do it the same way a href?
View Replies
View Related
is it possible to pass parameters in html like in asp.... products.asp?cat=3
.... what i want to do is when i click on a html link, it opens up news.html,
and then opens up a particular news article in an iframe on that page.
View Replies
View Related
Is there code that I can use to 'repeat' code.For example:I have a form that has about 30 fields on it. I then submit it to anotherform that has about 20 fields on it. I then submit the second form to a third and so on. During this process, I pass all of the fileds as Hidden Fields. My code has over 200 hidden fileds in it and sometimes they get mis-spelled or somthing. I thought that I saw something that you can tell the page to 'repeat' certain code for all parameters on the page by using a FOR EACH command.
View Replies
View Related
I have some troubles with the correct syntax, hope to get some help. This is the intention. This is the code I'd like to use.
strSql = "Select * from ta where ta_nr = %artnr%"
<!-- include file = "%artnr% & .asp"-->
View Replies
View Related
Need some help passing parameters
address = Info_RS("Address")
city = Info_RS("City")
st = Info_RS("State")
zip = Info_Rs("Zip")
<a href="address.asp?param1=Address¶m2=city¶m3=st¶m4=zip">Address Change </a>
It will not pass.. it just passes the text.
View Replies
View Related
The web server is running on IIS with asp. I'd like to know how do you execute #include with asp in a file with extension .html. The codes work fine with .asp but I'd like to do this in .html.
View Replies
View Related
Is there a way to pass a URL parameter from a previous page to the next page (without clicking a hyperlink)?
There are 3 pages. user_edit.asp, user_delete.asp, user_delete2.asp. I want to pass the customer_id parameter from user_edit.asp via a hyperlink to user_delete.asp and then after some asp manipulation I want to pass the existing customer_id parameter to the user_delete2.asp page (or again to user_delete.asp) without the user doing anything (such as accessing a hyperlink).
View Replies
View Related
I am running into an issue when I try to write more than 1024 characters to
a memo field. Apparantly the odbc connection I am using does not permit
literals to be larger that 1024 characters. This Memo filed can take
virtually infinate data, so the solution seems to be use parameters. My
problem is I have never heard of this and need this to work ASAP Does
anyone have a simple example of how Parameters work using ASP
View Replies
View Related
I have several parameters that I need to pass into a stored procedure. Each parameter holds a comma delimited list.
I tried splitting the parameters and executing the stored procedure doing the following:
Dim CmtIdLoop
CmtIdLoop = Split(Request.Form("commentsID"),", ")
revwStatLoop = Split(Request.Form("review_status"),", ")
abrstatLoop = Split(Request.Form("abr_status"),", ")
commentsLoop = Split(Request.Form("comments"),", ")
For l = 0 to Ubound(CmtIdLoop)
s = CmtIdLoop(l)
t = revwStatLoop
u = abrstatLoop
v = commentsLoop .....
View Replies
View Related
I am trying to do any better than this and am losing my confidence daily as I pressumed this to be easy and I am sure once I have done it I will wonder what all the fuss was about!
My experience with ASP is limited to one Degree module and I am trying to build a prototype web site. I need pointing in the right direction to what I presume is a common ASP requirement - a ‘second level of user enquiry’. Code:
View Replies
View Related
i have a folder Services and this folder has index.asp file. i need to put a link in email specific to the user. i can do:
www.myweb.com/Services/index.asp?parm1=1&parm2=2
How i can do this same very thins as
www.myweb.com/Services?parm1=1&parm2=2
as the default file name is index.asp so it will get executed if i put www.myweb.com/Services in the URL Address box. Here when i try to pass parametrs to the folder, this results in page not found.
View Replies
View Related
I wrote a simple client/server chat program and the client runs as an
activex control within an asp page. I have the users logging into
the page using widows authentication and I'm using
Request.ServerVariables("AUTH_USER") to get the users name. I'd like
to pass this name to the activex chat client thru the page but I'm
having some difficulty. I tried passing it as a parameter to the
"Tag" property within the <OBJECT> element like this:
<%
username=Request.ServerVariables("AUTH_USER")
username=right(username,len(username)-instr(1,username,""))
' remove the domain or machine name from the username
Response.Write "<PARAM NAME=" & chr(34) & "Tag" & chr(34) & " VALUE="
& chr(34) & username & chr(34) & ">"
%>
When I do this the ActiveX control doesn't appear on the page. Is
there a better way to do this? I also tried creating a public sub in
the activex control and calling it as a method from within the page
but I can't seem to get the syntax right. I keep getting "Object
Required" errors.
View Replies
View Related
Real quick, please refresh my memory which one of the following preserves the information that was posted from a form?
server.execute
server.transfer
response.redirect
I need to have a page execute if an error occurs while processing a page that a form was submitted to and have the data preserved.
View Replies
View Related
I am trying to write a little script using includes ... but I am getting errors, I am passing a URL variable to use an include.
<!--#INCLUDE VIRTUAL=Request.QueryString("path")-->
Am I missing something?
View Replies
View Related
Is there a way i can send variables to an included page other than the session. I know about doing it via the session but i find that a bit messy and it might affect system performance.
can i use
server.execute (my.asp?id=6)
or something similar ?
I have to include a menu on the side of every page that looks different depending on what page is being displayed so i need to find a way to do this properly.
View Replies
View Related
Any one has Idea, How to use Server.Transfer and Server.Execute, When I tried to use these methods I got an eror:
Server object error 'ASP 0230 : 80004005'
Server.Transfer Error
/SISWeb/portal_logon.asp, line 40
The call to Server.Transfer failed while loading the page.
anybody is there who can respond to this problem. Do I need to change any setting at IIS?
View Replies
View Related
i'm using a model, view, control architecture for a group of .asp pages.
i can't decide whether to use Server.Transfer or Server.Execute to pass posted data from my control to my model. are there security implications for using Server.Execute?
just wanting some advice on pros/cons to each of these since this is the first time i'm attempting to use these methods.
View Replies
View Related
I have a website and use server.execute quite extensively. The website was put into production and at first all worked great.
but some users were getting to my site but an error message would pop up stating page was not loaded properly. TO many users it looks like the website simply does not exsist.
What happens is that when the web page (www.cheapbatterypacks.com/main.asp) gets executed it will fail for "some" people at the server.execute point.
Here is a good example of the problem. In my shop I have 3 computers on the same network. connected to a dsl connection etc. All have internet access all run IE6 etc. 2 will pull up www.cheapbatterypacks.com just fine. but 1 will not. maybe some of you will see the same error.
if you type www.cheapbatterypacks.com/loosecells.asp it will pull up fine but that file is supposed to be loaded by the server.execute function and not run on its own.
so now I am pulling my hair out to try and get these other folks on board and working.
How would something be so selective like this. COuld it be me webserver settings? And even if it was how come it appears to only affect some people.
This is a public website so there are no logins/passwords etc meaning they come in a anonymous and have only read/execute permissions.
I am still running windows 2000 server with all Sp's patches etc. IIS 5.0.
View Replies
View Related
If I have multiple websites on the same server,can I use the #include directive to reference include files elsewhere on the server? I tried this -
<!--#include file="C:InetpubvhostsATRAMEMBER.COMhttpdocsheader.asp" -->
But no dice...
View Replies
View Related
Can server.execute provide a return value? How? ie.
dim test
test = server.execute("page2.asp")
What code in page2.asp will produce something in test?
View Replies
View Related
In Page1.asp I am calling Server.Execute("Page2.asp"). Before calling
Server.Execute(), I set an application variable to a value that it is
important for me to know that it doesn't get accessed by another ASP page
before I call Application.unlock in Page2.asp, that is why I use
Application.lock.
According to the documentation, Application.lock gets automatically unlocked
when the ASP page terminate, I want to confirm that calling Server.Execute()
doesn't automatically unlock the application, i.e that Page2.asp will start
executing when the application is still locked.
View Replies
View Related
I need to use Server.Execute for dynamic includes. My files are located in different folders and what works for one doesn't work for another. I need to include the full path to the file because relative paths do not work. Can someone tell me how to do something like this:
Server.Execute(Server.MapPath("./") & "includessubnavigationdefault.asp")
I keep getting this error:
Invalid URL form or fully-qualified absolute URL was used. Use relative URLs.
The problem is I NEED to use relative URLs some how.
View Replies
View Related
I'm working on a web app, and I want my global.asa file to execute another file (it's a configuration file which then writes a stylesheet file), but I can only seem to get the global.asa to run once in a while. For a stretch, whenever I edited the global.asa, it would run on the next server request. I had read somewhere that the IIS process had to be restarted each time you wanted the global.asa file to execute, so when it stopped running every time I changed it I wasn't too surprised. But now, even when I restart the IIS process, the darn thing won't run! I've tried putting my server.execute statement in a regular .asp file and it creates the stylesheet file every time I run it (so I know the file I'm trying to execute runs properly). I just don't get what's going on with the unpredictability of the stinkin global.asa.
View Replies
View Related
I have an ASP calling a scriptlet. There is a method "Exec" which is
using Server.Execute to run any ASP file/command. There rest of the methods
are working fine.Somehow, wscAsp.Exec("myLocalProc"), didn't work. Please
help.
My ASP:
<%
Set wscASP = CreateObject("ASPScriptlet")
wscASP.sName = "sName (R/W)= OK"
%>
<P>The current date is <%=wscASP.GetDate()%></P>
<P>The value of the Var1 is <%= wscASP.GetVar()%></P>
<%
Call wscAsp.Exec("myLocalProc")
Sub myLocalProc
response.write "Scriptlet is executing myLocalProc!"
End Sub
%>
The Scriptlet, wscAsp.Exec method, is purely just call Server.Execute("any
string passed in")
View Replies
View Related
I'm trying to get a page included into another page, and so far I've been using Server.execute("home.asp") without any problems ['home.asp' is just an example], but now I' m trying to get this to work:
server.execute("home.asp?foo=bar")
but to no avail. Code:
View Replies
View Related