Writing response.redirect and response.write within the same statement

Ok the code goes something like this
<%
blahblahblah.....
blahblahblah..............
Shipname = Trim(Request.Form("ShipName"))

                        Session("orderID") = ""
                        Response.Redirect "checkout.asp"

            else

            rsProd.Close
            set rsProd = Nothing

            Response.Redirect "checkout.asp"
            end if
      end if
end if
 %>

Now I need to make it to
Response.Redirect "checkout.asp? <---then response.write the variable shipname"

Thanx in advance
LVL 1
PatriotecAsked:
Who is Participating?
 
Computer101Connect With a Mentor Commented:
PAQed, with points refunded (50)

Computer101
E-E Admin
0
 
sciber_dudeCommented:
<%
blahblahblah.....
blahblahblah..............
Shipname = Trim(Request.Form("ShipName"))

      if  Session("orderID") = "" then                                               ' <<<< you missed the if ... then here
                    Response.Redirect "checkout.asp"

          else

          rsProd.Close
          set rsProd = Nothing

          Response.Redirect "checkout.asp?Shipname=" & Shipname
          end if
     end if
end if
 %>
0
 
sciber_dudeCommented:
I am assuming that you want the variable to be set to checkout.asp with the variable name Shipname.
:) SD
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
PatriotecAuthor Commented:
yes i want send the variable 'shipname'  to checkout.asp
and in checkout.asp i already have         strShipMethod = Trim(Request.Querystring("ShipName"))
0
 
PatriotecAuthor Commented:
This did the trick.

Response.Redirect("Checkout.asp?shipname="&Trim(Request.Form("ShipName")))

Thanks for trying to help out. Much appreciated.
0
 
joeposter649Commented:
You might consider using server.transfer here instead of redirect.  Redirect requires an extra trip back and forth to the client.
Check out tip #22...
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnasp/html/asptips.asp
0
 
cheyennejkCommented:
Simply send SHIPNAME to the next page via an invisible Form.



<Form>
<INPUT type = hidden hideFocus readOnly id="rpt_month" name="ShipName" value="<%=Shipname>">

....
0
 
PatriotecAuthor Commented:
Hey how do I accept my own answer or close this question???
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.