title: passing a value of a function into a text box
body: <pre><code>Private Function Token() As String
  
          Dim Length As Byte
          Length = 10
          Dim Chars As Char() = New Char() {"a"c, "b"c, "c"c, "d"c, "e"c, "f"c, _
         "g"c, "h"c, "i"c, "j"c, "k"c, "l"c, _
          "m"c, "n"c, "o"c, "p"c, "q"c, "r"c, _
         "s"c, "t"c, "u"c, "v"c, "w"c, "x"c, _
          "y"c, "z"c, "A"c, "B"c, "C"c, "D"c, _
         "E"c, "F"c, "G"c, "H"c, "I"c, "J"c, _
         "K"c, "L"c, "M"c, "N"c, "O"c, "P"c, _
          "Q"c, "R"c, "S"c, "T"c, "U"c, "V"c, _
         "W"c, "X"c, "Y"c, "Z"c, "0"c, "1"c, _
         "2"c, "3"c, "4"c, "5"c, "6"c, "7"c, _
         "8"c, "9"c}
  
          Dim [Str] As String = String.Empty
          Dim Random As New Random()
  
          For a As Byte = 0 To Length - 1
              [Str] += Chars(Random.[Next](0, 61))
          Next
          Return ([Str])
      End Function
  </code></pre>
  
  <p><strong>txtpassword.Text = Token()</strong></p>
  
  <p>is the above bolded line a correct .. it's not working too </p>
  
  <p>and the above code is used to generate a random password for users which should be displayed on the text box, if possible in label which is more advicable</p>