Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-24
9
Medium Priority
?
138 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
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
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.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

916 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