Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old July 25th, 2008, 10:51 AM
Registered User
 
Join Date: Jul 2008
Location: Phoenix, AZ, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Passing data via querystring

I am a newbie and am writing my first ASP.NET 3.5 form in VB.
I have a ReadOnly mode FormView that pulls the First and Last name fields from a SQL DB based on user input to a textbox. When the form is complete and the user clicks the submit button, I need to pass the first and last names to the Thank You page via a Response.Redirect string. What is the syntax to reference the data in the ReadOnly Formview1 control and then how do I pass that in the codebehind for the submit button?
Reply With Quote
  #2 (permalink)  
Old July 25th, 2008, 11:37 AM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Let's say you want to pass Bob and Smith, and you are redirecting to ThePage.aspx. After the URL add a question mark, followed by name/value pairs:
Code:
"http://www.ServerName.com/ThePage.aspx?first=Bob&last=smith"
If the data were in variables a & b:
Code:
"http://www.ServerName.com/ThePage.aspx?first=" & a & "&last=" & b
So, as you can see, where a & b are, you can put anything that returns a string...
Reply With Quote
  #3 (permalink)  
Old July 25th, 2008, 12:02 PM
Registered User
 
Join Date: Jul 2008
Location: Phoenix, AZ, USA.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by BrianWren
 Let's say you want to pass Bob and Smith, and you are redirecting to ThePage.aspx.  After the URL add a question mark, followed by name/value pairs:
Code:
"http://www.ServerName.com/ThePage.aspx?first=Bob&last=smith"
If the data were in variables a & b:
Code:
"http://www.ServerName.com/ThePage.aspx?first=" & a & "&last=" & b
So, as you can see, where a & b are, you can put anything that returns a string...
Thanks for your reply. I need the exact syntax of identifying the data that is held in the FormView1 - from the codebehind on the submit button, and then I need the syntax for adding that to the querysting and then the syntax to add to the 2nd page codebehind to grab the data from the querystring.
Reply With Quote
  #4 (permalink)  
Old July 25th, 2008, 12:20 PM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there..

Question, because I don't remember exactly, but doesn't asp.net has a previouspage object where you can obtain that kind of info?

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
passing password in in querystring jaya929 ASP.NET 2.0 Professional 5 May 27th, 2008 07:47 AM
Passing more than one querystring in the site map kaushikpulpa ASP.NET 2.0 Basics 1 April 20th, 2007 08:08 AM
Passing a querystring value that contains '&' jfrizelle Classic ASP Databases 3 March 20th, 2006 08:27 PM
Passing URL in a Querystring hugh@kmcnetwork.com Javascript How-To 3 July 8th, 2004 04:59 PM



All times are GMT -4. The time now is 04:21 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.