Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-08-24
9
Medium Priority
?
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 11

Expert Comment

by:sciber_dude
ID: 11881018
<%
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
ID: 11881030
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
ID: 11881048
yes i want send the variable 'shipname'  to checkout.asp
and in checkout.asp i already have         strShipMethod = Trim(Request.Querystring("ShipName"))
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Comment

by:Patriotec
ID: 11881505
This did the trick.

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

Thanks for trying to help out. Much appreciated.
0
 
LVL 15

Expert Comment

by:joeposter649
ID: 11881630
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
ID: 11974327
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
ID: 11980227
Hey how do I accept my own answer or close this question???
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 12276454
PAQed, with points refunded (50)

Computer101
E-E Admin
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

715 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