---------------------------------------------
The Execute method allows you to call another ASP page from inside an ASP page. When the called ASP page completes its tasks, you are then returned to the calling ASP page. The overall effect is very similar to a function or subroutine call. Any text or output from the called ASP page will be displayed on the calling ASP page. The Execute method is a more useful alternative to using server-side includes.
In contrast, the Transfer method allows you to transfer from one ASP page to another without returning to the calling ASP page.
There is one mandatory argument.
---------------------------------------------
Fair enough does what I need it to. However, I've run into a glitch. I understand the point about it being like calling a sub which means anything set within the executed page will be considered local and so anything set within it won't work in the calling page. What I don't understand is why the executed page can't read objects which have been set in the calling page before the execute???
Got a quick query in relation to the Server.Transfer method available in IIS 5+/ASP. I've got an issue where I want to take a portion of an online app and extract this out into a web site on its own, so I will end up having two web sites. This planned to aid problems we've been having with performance, as if the portion (which is an app in its own right) has problems we then have to restart the whole site and so bring everything down just because of the portion of the app which we're having issues with. Taking the portion of the site will allow us to run it in isolated mode in ISS and so just restrat that if needed, while not affecting the rest of IIS.
Anyways, I'm in the process of writing a jump page to facilitate the process of moving from the first site to the new second site, but as we need to reuse session info created in site 1 I need a way of passing this over to the second site.
I've been aware of the Server.Transfer but never really used it so I'm not too sure how I can actually use this. I was planning to write an ASP page that takes the required info out of session is site 1, calling Server.Transfere to send it over to the second site. I don't want to do a Response.Redirect, not wanting the client to do this and not allowing it to know what info I'm using in the session.
And so, I thought the Server.Transfer would facilitate this, but after reading some of the documentation on MSDN I'm not sure I can, ie: redirect to another ASP page in this way and tack on a QueryString holding all the session info I need, as MSDN says that I'll get an 'ASP 0173 error, "Invalid Path Character"' error if I have a question-mark '?' in the path, or any other of a list of invalid chars. But then I need this '?' char to build my QString ie: XXX.asp?sas=123&jdy=0689...
So what I'm after is some clarification that I can use Server.Transfere in this way or not, ie to redirect to an ASP page and tack on a QueryString, of if it just allows for an ASP page without s QString. So then if I want to do this I might need to use the Response.Redirect method, or some other way!!
MSDN also says: "When you use the Transfer method, the state information for all the built-in objects are included in the transfer. This means that any variables or objects that have been assigned a value in session or application scope are maintained"
....So will I have the session info from site 1 available in site 2 after the redirect or does this only apply for a Server.Transfer within the same web (which I think is what it means!).
I don't have an environment up that I can test this on yet so I'm kinda feeling may wat in the dark here, hence my lengthly post.
Our asp programs seem to have different behaviors when users use IE and firefox. One of most annoying things is the data disappearing problem in IE but not in firefox.(Note: Sometimes a search program can run much faster in Firefox than in IE, don't know why) For example, I have an internal user interface which they can do different product data entry, the program will use Server.Transfer to different asp program for data entry.
Page1---UserInterface.asp Select Case Request("Product") Case "Sel" Server.transfer("/Virtualdir1/test1.asp ")
Server.Transfer("/Virtualdir2/Test2.asp")
Case "Bear" Server.Transfer("/Virtualdir3/test3.asp")
Case "IMED" Server.Transfer("test4.asp")
Case "AC" Server.Transfer("/Virtualdir4/test5.asp")
Case Else
End Select
When user finished data entry on test1.asp(second page, the web address will still show UserInterface.asp page as you know), click continue, on the third page if they found something typed wrong, if they click back button in the broswer, all data on the second page is gone. This only occurrs in IE, Firefox is fine.
It's very annoying, how can I fix it, if not, is there any other way?
I like to know how to write this specifc function on ASP where the user eg: display a set of records on the webpage. Example the data are ID, Name and address.
Lets say i display the data on the webpage and i set the Name as the <a href>. So when i click on the name, it will move to another page with the id of the specific name. Code:
I would like the value of the textfield from text1 from Select_License.asp to be transfered to swname from License_add.asp when i click on the Next button from Select_License.asp ....
I am trying to have my asp page direct the user to the page that called the current page, but the only code that I have found is on the MIcorsoft MSDN Knowledge base and it won't work.
I'm trying to add logging to my web application, but I found a strange problem. Whenever I execute a Server.Redirect(Page1.asp) I can use the request.ServerVariables("SCRIPT_NAME") to get the current page name. However, if I use Server.Transfer(Page1.asp), the value of the server variable equals the refering page (In this case default.asp). How do I get the value of the working page regardless of the transfer method.
I would like the value of the textfield from text1 from Select_License.asp to be transfered to swname from License_add.asp when i click on the Next button from Select_License.asp
I’ve been racking my brains trying to figure out why when I call a record set back with a SELECT * it only brings back some of the fields. It use to be connecting to an access 2000 DB and worked fine but I’ve converted it over to SQL. I’ve installed SQL server DEV edition and imported the data. The desktop is running XP.
Has anyone got any ideas why it only picks some of the fields in the record set and not others? O I’ve tried timeout = 0 on the connection already..
I have very limited asp knowledge so I just use the built in dreamweaver functions at work. I've done an update recordset before but this one as me baffled.
When trying to modify the article and update the database the upodate doesn't work, the page if succesful should redirect to the news admin. I've searched for about the last hour but no joy. The code is as follows: Code:
I have an asp page that collects data from a database and then displays it in a table on the page. I also want to be able to put this information into excel. I know how to get the page to load up in excel and then display the data using the following command -:
response.contentType = "application/vnd.ms-excel"
however I want it so that there is an Extra button on the page that the user can press to transfer the data accross. Does anyone know how to do this?
I'm currently writing an asp page . There are many variables inside i want to transfer to another asp pages to use them. They are just normal variables calculated in this page (not variables received with http query ), therefore i dont know how to receive and use them in a new asp page.
I need to return XML from a SQL Stored Procedure which I will execute through ASP ADO code. Stored Procedure as below:
CREATE PROCEDURE pr_GetJobInfo2 @JobType int, @CntryID int, @JobTitle varchar(8000) OUTPUT AS SELECT @JobTitle = ltrim(rtrim(JobTitle)) FROM dbo.JOBS WHERE JobType = @JobType AND CntryID = @CntryID FOR XML AUTO [code]
Now the output parameter (@JobTitle) cannot be assigned to FOR XML, so what must I do ??? My ASP code reads as: ....
to download my asp page to the client. The download process works great but when I open the .doc file it is missing the image included within the html <img> tag of the .asp page. How do I get the image to come down with the text?
I created C# COM+ component. It has two overloaded methods - the method names are same and their signatures are different, one takes two parameters and another takes four. I coded this way: the method with 4 parameters is coded first and then the one with 2 parameters.
I created very simple ASP page to call these two methods. Calling the method with 4 params has no problem. However, calling the method with 2 params I get the error saying:
Error Type: Microsoft VBScript runtime (0x800A0005) Invalid procedure call or argument: 'SetReferenceValues' /suitevoyager/testLmx.asp, line 16
I've created a DLL file that enables you to validate accounts and send emails through the MS Exchange server within the Intranet. This dll can be used from within VB, VBA, VBScript and also ASP VBScript. I'm using it in an ASP page that I've created. The DLL has a "SEND" function that will return a string value containing all the invalid accounts seperated by a semi-colon. A sample of the returning string value would look like, "InvalidAcct1;InvalidAcct2;InvalidAcct3". The DLL works like it is suppose to when used in an ASP, but it will not return the string value. I know the DLL works fine because it returns it when used in a regular VBScript or VB program.Is IIS preventing the string from being returned?
I am using a windows 2000 server with IISLockdown and ISAPI_Rewrite installed on it. I have 2 websites A & B. ASP pages on A are working properly, but when placed one B they return 404 error. All other pages such as txt, html, asp.net work fine on B. Both websites have the same configuration, and use the same ISAPI filters.
A sample cade the is not working is, file name test.asp: <%@ LANGUAGE="VBSCRIPT" %> <% response.redirect("http://www.cnn.com")%>
There are two pages main.asp and phonebook.asp.In the main.asp, there is a textfield, where the phone number will be inserted into it. Next to the textfield, there is an icon that when clicked takes you to the phonebook.asp page.
In the phonebook.asp page, there is a list of the telephone numbers and next to them there is a radiobutton. When one of the radiobuttons is chosen (the telephone number is chosen), the number (value) needs to be inserted in the textfield (main.asp page).How may i do this processing? Preferably i need to use asp together with vbscript or even javascipt.
I am using a windows 2000 server with IISLockdown and ISAPI_Rewrite installed on it. I have 2 websites A & B. ASP pages on A are working properly, but when placed one B they return 404 error. All other pages such as txt, html, asp.net work fine on B. Both websites have the same configuration, and use the same ISAPI filters.
A sample code that is not working is, file name test.asp: <%@ LANGUAGE="VBSCRIPT" %> <% response.redirect("URL")%>
I have a MS SQL 7.0 table with a large field (> 500 characters). My select statement embedded in my ASP file in an intranet web interface only returns 255 characters. If I run the select statement in Query Analyzer, I can easily change the "Maximum Characters per Column" setting to return the entire field, but that doesn't help me in my ASP web interface. How do I return the entire field through ASP?
I have a form page a user needs to fill out. I want to be able to send the user back to the form once it is submitted and an error in processing occurs, for example if they have an illigal charcter in the form somewhere. The whole form wouldn't need to be retyped, just the field in question.
How can I send the user back to the form they just submitted to correct an entry?
I am passing a XML to SP, and SP in return send XML back. When I comment out sp_xml_preparedocument (XML reading block) in SP, ASP is taking returning XML as valid, but, if I uncomment input XML reading block, ASP is giving following error: Code:
Set RS=CN.Execute("INSERT into tableX yada yadayada ; SELECT SCOPE_IDENTITY()")
Using Profiler, I see the statement go through. But ASP gives me an error saying RS is not an object. "Operation is not allowed when the object is closed."
In these lines if not RS.EOF then theNewId=RS.Fields(0) end if
If I run the same query in QueryAnalyzer, I do get a return value.
I've got a site with PayPal and Google Checkout payment options. The checkout page formats two HTML forms, containing bespoke cart code - one posts to PayPal, the other to Google Checkout.When an order is placed, it needs to be updated back on my site, so that the order is marked as 'paid' in the database. When this is done with PayPal, I just provide a hidden field in the form called 'invoice' containing my id number for that transaction. This is returned in my IPN, and I update the database accordingly. However, I can't find a similar field in Google. Their example code all seems to be in XML and is WAAAAAAAAY more complicated than I need it to be. I just need to send a value with my cart code to Google Checkout, and have that value returned after the transaction has completed. I've set up Google Callback, and the page is being called and the order is being written to my google log txt file, I just need this to contain my order id number for the transaction so I can just add the logic to update the database based on this id number.
I have a table that has ticket number displays as a link.When I click on a ticket number it displays no data was return. (" it's not reading the ticket number I choose")Can someone look over my codes and tell me what should be doing! I am a the final part and I lost.