Solved

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

Posted on 2004-08-24
9
128 Views
Last Modified: 2010-04-06
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
Comment
Question by:Patriotec
9 Comments
 
LVL 11

Expert Comment

by:sciber_dude
Comment Utility
<%
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
 
LVL 11

Expert Comment

by:sciber_dude
Comment Utility
I am assuming that you want the variable to be set to checkout.asp with the variable name Shipname.
:) SD
0
 
LVL 1

Author Comment

by:Patriotec
Comment Utility
yes i want send the variable 'shipname'  to checkout.asp
and in checkout.asp i already have         strShipMethod = Trim(Request.Querystring("ShipName"))
0
 
LVL 1

Author Comment

by:Patriotec
Comment Utility
This did the trick.

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

Thanks for trying to help out. Much appreciated.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 15

Expert Comment

by:joeposter649
Comment Utility
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
 
LVL 2

Expert Comment

by:cheyennejk
Comment Utility
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
 
LVL 1

Author Comment

by:Patriotec
Comment Utility
Hey how do I accept my own answer or close this question???
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
Comment Utility
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now