Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

passing variables (vb.net)

  • 12-02-2007 09:49PM
    #1
    Registered Users, Registered Users 2 Posts: 1,000 ✭✭✭


    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, Registered Users 2 Posts: 1,000 ✭✭✭MargeS


    doh! I worked this out! :o

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


Advertisement