Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

passing variables (vb.net)

Options
  • 12-02-2007 9:49pm
    #1
    Registered Users Posts: 1,002 ✭✭✭


    I have dimmed a variable in Protected Sub Page_Load() and it is getting its value from the url:
    Dim var As String = Request.QueryString("data")

    This variable is being used in other functions and is being passed in the usual way to them Function(var), Sub Procedure(var), etc.

    But I also need this variable in my Submit Button Sub:
    Protected Sub SubmitBtn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SubmitBtn.Click
    Because the variable is privately dimmed under Sub Page_Load() I can't pass it to the Button Sub.

    Is there some way to do this that I don't know of? txs.


Comments

  • Registered Users Posts: 1,002 ✭✭✭MargeS


    doh! I worked this out! :o

    Sometimes when you write something out it makes more sense. :rolleyes:


Advertisement