Newbie - Question with ASP Syntax using Request.Form in string 
Author Message
 Newbie - Question with ASP Syntax using Request.Form in string

Here's my situation...

form1 --> processs form (print_pdf_proc.asp) --> write letter
(print_pdf.asp)

form1 has 3 variables, let's say they are:

firstName=joe
lastName=user
phone=911

the page that processes the form (print_pdf_proc.asp) is used to print
a pdf sales letter using the above variables.  the print_pdf_proc.asp
page has the following code:

<% Response.Buffer = TRUE %>
<%
' Create the component
set PDF = server.createobject("aspPDF.EasyPDF")

' Adds html from a URL
PDF.AddHTML "http://<<localhost>>/logo_app/print_pdf.asp?firstname=Request.form('firstName')&lastName=Request.form('lastName')&phone=Request.form('phone')"

PDF.BinaryWrite

' destroy it
set pdf = nothing
%>

For some reason the three variables are not being pulling into the
querystring on the page above.  On the final letter my firstname
varibable is printing out as (literally) Request.form('firstName')
instead of "joe".  The final print_pdf.asp page is using
response.write to pull in the values. So the final document is at
least pulling in data for each variable, but the data is the literal
"Request.form" text.

hopefully this makes sense.  Any help?



Sun, 26 Jun 2005 23:30:41 GMT  
 Newbie - Question with ASP Syntax using Request.Form in string
Try :

'http://<<localhost>>/logo_app/print_pdf.asp?firstname=Request.form("firstNa
me")&lastName=Request.form("lastName")&phone=Request.form("phone")'

The single and double quototation marks are swirched.



Sun, 26 Jun 2005 23:43:16 GMT  
 Newbie - Question with ASP Syntax using Request.Form in string

Quote:
> Here's my situation...

> form1 --> processs form (print_pdf_proc.asp) --> write letter
> (print_pdf.asp)

> form1 has 3 variables, let's say they are:

> firstName=joe
> lastName=user
> phone=911

> the page that processes the form (print_pdf_proc.asp) is used to print
> a pdf sales letter using the above variables.  the print_pdf_proc.asp
> page has the following code:

> <% Response.Buffer = TRUE %>
> <%
> ' Create the component
> set PDF = server.createobject("aspPDF.EasyPDF")

> ' Adds html from a URL
> PDF.AddHTML

"http://<<localhost>>/logo_app/print_pdf.asp?firstname=Request.form('firstNa
me')&lastName=Request.form('lastName')&phone=Request.form('phone')"

- Show quoted text -

Quote:

> PDF.BinaryWrite

> ' destroy it
> set pdf = nothing
> %>

> For some reason the three variables are not being pulling into the
> querystring on the page above.  On the final letter my firstname
> varibable is printing out as (literally) Request.form('firstName')
> instead of "joe".  The final print_pdf.asp page is using
> response.write to pull in the values. So the final document is at
> least pulling in data for each variable, but the data is the literal
> "Request.form" text.

> hopefully this makes sense.  Any help?

Try this:

PDF.AddHTML "http://<<localhost>>/logo_app/print_pdf.asp?firstname=" &
Request.form("firstName") & "&lastName=" & Request.form("lastName") &
"&phone=" & Request.form("phone")

The Request.Form() bits need to be outside double quotes.

Lee.

--
___________________________________

Outlook Web Access for PDA and WAP:
www.leederbyshire.com
___________________________________



Mon, 27 Jun 2005 00:37:26 GMT  
 Newbie - Question with ASP Syntax using Request.Form in string

Lee's right!  Try :

"http://<<localhost>>/logo_app/print_pdf.asp" & _
"?firstname=" & Request.form("firstName") & _
"&lastName=" & Request.form("lastName") & _
"&phone=" & Request.form("phone")



Mon, 27 Jun 2005 01:09:11 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Problem in using Request.Form in ASP.NET

2. Problem using ASP Request.Form with Javascript Open Window

3. Grabbing Form data without using the Request.Form() Method

4. Newbie - Refrencing a Form Property Using a String

5. Request.Form syntax

6. Newbie Question: Dim A() as String /Dim A as String()

7. Decoding a Request.Form String

8. need help converting request.form collection to an array for sorting - newbie

9. Newbie question on a Form using Word 97

10. Using VB/ASP.net to save user requested web data

11. NEWBIE : Help Requested - Using Index File

12. Forms Collection: Using it to Open Forms by Passing the Form Name as a String Variable

 

 
Powered by phpBB® Forum Software