Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 139
  • Last Modified:

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
0
Patriotec
Asked:
Patriotec
1 Solution
 
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
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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
 
Computer101Commented:
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now