Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 553
  • Last Modified:

ASP.NET w/ VB Pass data in textbox on page into Labels on another page

The user enters data into 6 textboxes and then clicks continue.  The data in the textboxes then pass to labels on another page.  I have done this with a gridview and hyperlinkfields - not sure how to do this with textboxes.

This is sensitive information so query string would nto be the best choice from what I have read.
0
aninec
Asked:
aninec
  • 4
  • 3
1 Solution
 
raterusCommented:
Any reason you wouldn't first save the data to the database, then on the label page, you load and display.
0
 
aninecAuthor Commented:
Yes - I dont want to save the data until the user has completed the second page.  I just want to pass this info into the second page so that user can refer back to it if needed.
0
 
raterusCommented:
Time to break out the Session Object then...

On the page you enter information, after they submit
Session("myValue") = myTextBox.Text

On the label Page
myLabel.Text = Session("myValue").ToString()
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.

 
aninecAuthor Commented:
What about using PreviousPage?  Is this secure?

If PreviousPage IsNot Nothing AndAlso PreviousPage.IsCrossPagePostBack Then
                        Dim text1 As Textbox = CType(PreviousPage.FindControl("txtLast"), TextBox)
                  
                  
                  If text IsNot Nothing Then
                PtName.Text = text.Text
            End If
        End If
0
 
raterusCommented:
I think that'll work, however, I've not had much experience with it.  In order to use that, your first page, is going to have to post to the second page.  This is much different than the default behavior of asp.net pages, and if you haven't already configured that, you might be better off using the Session.
0
 
aninecAuthor Commented:
With the Session..is this on the users machine only?  Meaning I could have 5 users accessing the same page at the same time - entering the same data.
0
 
raterusCommented:
Session is per-user, and it's stored on the server.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now