The book I am referring to learn ASP states the following about server- side includes:
============================================== The code in a server-side include file is inserted into the pages that use it BEFORE the page's ASP code is evaluated. This means that you can put ASP code inside the include file, and it will be executed like it was part of the page that includes it. On the other hand, it means that you cannot use ASP to determine which page to include. ==============================================
But as opposed to the last line in the above para, the following code makes use of ASP to determine which page to include: Code:
I am troubleshooting a web site (not written by me) and may of the pages use server side includes. This one page includes a page that return includes the page the included it.
The site is quite slow and when I first found this I thought that this was the primary cause of it. Then I thought this page shouldn't work at all because it would create an infinite loop and should just recursively call the pages and eventually consumme all server resources and database connections.
However it doesn't appear to act that way and the page does display and there is no endless calls to the SQL statements in the two pages. Is there something that prevents recursive calling when using SSIs?
I have an xml document with a corresponding xsl file. I have the option of serving the xml directly for client side transformation or using a basic .asp file to transform the xml into xhtml.
All things being equal, I'd prefer to have the server do the transformation to avoid browser problems. Both options are basically working and the data in my xml files are being displayed properly through each method. Code:
I am using SSI navigation on my new ASP web site. On the original HTML version, if you clicked a link on the main navigation and entered a section, for example, SKILLS, the skills link on the navigation would be highlighted in a different colour, so the user would know which setion the were in.
To achieve this, in every single HTML page, I changed the CSS tag of the selected section. For example, Code:
I've been using SSIs for a while now. I'm now using them in a menu system. I'm trying to use multiple SSIs, that is SSIs within SSIs, but I'm just wondering if this will slow the pages down, and put too much strain on the server. I'll try to illustrate what I'm doing.
This is a dropdown menu system. Rolling over Link1 will reveal Link1-a, Link1-b and Link1-c, and likewise with Link2 and Link3: Code:
I am building up a library of Class'es that represent various columns of table layouts. One often used column is "name" and each occurrence is treated identically. (What a concept, eh?)
Part of that library of Class'es includes representations of various tables. (Just let me know if you see a trend going on here.) These Class'es use the column Class'es.
What I would like to do, but I have yet to find a way around duplicated names, is to place all the necessary supporting column Class #include's in the table's Class so that I need only place the table's Class in the module utilizing them.
I understand entirely why the "duplicate name" error occurs.
What I am looking for is a way around the conundrum that does not require duplication of code. Any ideas?
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?
I've just been caught out by a host that doesn't support #includes in my ASPs. What's the best strategy for replacing these calls to files that include everything from subs and functions, global constants, other #includes, script directives, etc.??
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.
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.
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.
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:
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.
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")
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.
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:
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:
I'm trying to implement the server.execute instead of using SS includes in a new project I'm doing. the server.execute command will not transfer variables or classes/subroutines defined on the other pages. Is this correct?
That's what I'm seeing but I want to be sure that I'm doing it right. I had to go back to SS includes to include my functions and classes I have stored in other files.
Is it possible to server.execute a file that has a list of constants and then use those constants? I've tried, but the asp tells me the the variable is undeclared when I try to <%=const_name%>
We have a webshop that has frames (content and "menu in two parts") I'm experimenting with the general layout and have changed the location of the link to the cart to be in the (upper) menu frame. The cart is hidden unless you "call" it.
When something is added to the cart there is a redirect back to where the customer put something in the cart.
But I also want the link to the cart to change so that it reflects the fact that something has been put there.
I've tried Server.Execute("logg2.asp") but nothing happens, but a refresh changes the link. Code:
It would like to know in expense of resource of processing of the server which is better for use (Response.ContentType = "application/vnd.ms-excel") or an object vb that generates excel.
is there an industry standard method of costing out a project the problem i have is that when talking to a developer they say "i dont know how long it will take" which just isnt acceptable.
I would like to know how could I execute a command/script on server side which is located in the same directory as the asp ? And how could I response.write() the result?
I am having a problem using server.execute on my local machine.
I have set up a virtual directory in IIS call "UltraCamp"
When I use [VBS]server.execute("/scripts/calcenrollment.asp") [/VBS]
it looks for the file in the localhost root instead of the ultracamp root. I can change to[VBS]server.execute("/ultracamp/scripts/calcenrollment.asp") [/VBS] but that is a pain because I have to change it everytime I post to the live site.
What do I need to change to make this work correctly?