response.redirect


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: response.redirect

  1. #1
    Join Date
    Feb 2005
    Posts
    3

    response.redirect

    In asp.net, I'm calling a page using querystring.
    My line of code is the following:
    dim prlast as string
    prlast = textbox1.text
    response.redirect("getall.aspx?lastname=prlast")

    This code resides in the code-behind file. I'm using vb.
    My problem is that when the variable prlast is passed to getall.aspx, the value of prlast is not passed. What is past is the literal word 'prlast'.
    What do I need to do so the value of the prlast variable gets passed?

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Try this:
    Response.Redirect("getall.aspx?lastname=" & prlast)

    or this:
    Response.Redirect(String.Format("getall.aspx?lastname={0}", prlast))
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center