Results 1 to 31 of 31

Thread: Newb Question, Global Variables

Hybrid View

  1. #1
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Newb Question, Global Variables

    Hello,

    As a simple example:

    Code:
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If Not Session("RandomWord") Is Nothing Then
                Me.Label1.Text = Session("RandomWord").ToString()
            End If
        End Sub
    
        Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Session("RandomWord") = Me.TextBox1.Text
        End Sub
    Gary

  2. #2

    Thread Starter
    Junior Member
    Join Date
    Jan 2012
    Posts
    18

    Re: Newb Question, Global Variables

    I'm sorry, I need more of an explanation. Can you explain session variables and then with my code show me how to implement it so I can understand it better?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width