User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the VB.NET section within the Software Development category of DaniWeb, a massive community of 402,753 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,462 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our VB.NET advertiser: Programming Forums
View Poll Results: I am not sure what this is all about
I am not sure what this is all about 1 100.00%
I am not sure what this is all about 0 0%
Voters: 1. You may not vote on this poll

Views: 3746 | Replies: 0
Reply
Join Date: Jun 2005
Posts: 17
Reputation: erikkl2000 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
erikkl2000 erikkl2000 is offline Offline
Newbie Poster

Solution HttpContext.Current Question

  #1  
Jun 23rd, 2005
Hello All, :rolleyes:

I found this code from and artical posted back in may and i had a newbie question that i would like to add to it.

1. Is this the proper all around method to pass values?
2. How would i capture these values? Could i do it in a textbox, label, ect..
3. Coluld i capture it in hidden fields some way.

* Anything someone would like to inform my on about the ((((HttpContext.Current Question))) and what it is all about ((From a developers standpoint))) i would love to hear about it!

Thank you ahead of time.

Erik.....

Dallas..


==============WebForm1=========

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
End Sub


Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
Dim context As HttpContext = HttpContext.Current
context.Items.Add("strFirstName", TextBox1.Text)
Server.Transfer("Webform2.aspx", True)
End Sub


End Class

=========================Webform2=====================

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
Dim context As HttpContext = HttpContext.Current
Response.Write("Your First Name is: " & context.Items("strFirstName"))
End Sub

End Class
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb VB.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the VB.NET Forum

All times are GMT -4. The time now is 8:22 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC