Little But Big Code Problem RRS feed

  • Question

  • User988538322 posted

    hi its my Code 

     Dim a, b As String
        Public Sub TestStr(ByVal Str As String)
            Str = "abc"
        End Sub
        Public Sub TestText(ByVal Text As TextBox)
            Text.Text = "abc"
        End Sub
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            TextBox1.Text = a
            b = TextBox2.Text
        End Sub

    the problem is TextBox fill Successfully but String can not be filled. it shows empty. Please Help

    Thursday, November 17, 2011 11:40 PM


  • User197322208 posted

    Pass argument byref, not byval

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, November 17, 2011 11:51 PM