title: Access variable from code behind via javascript
body: <p>I have the following code that I want to return to a variable "t" in javascript:</p>
  
  <p>Code behind:</p>
  
  <pre><code>Public Shared Function GetSomeText() As String
    Dim result = "This is from code behind"
    Return result
  End Function
  </code></pre>
  
  <p>Caller variable in javascript:</p>
  
  <pre><code>//This is not working like that, I think
      var t = GetSomeText();
  </code></pre>
  
  <p>So, how can I make variable "t" get the "result" from Function GetSomeText from code-behind?</p>
  
  <p>Thank you.</p>