Why Async function returning System.Threading.Tasks.Task`1[System.String]?
<p>I have a VB.NET function as below:</p>

<pre><code>Public Shared Async Function GetIdDoc() As Task(Of String)
    Dim result As String = ""
    'Dim Uri As String = "http://localhost:53917/api/Documenti/GetNextIdDocumenti"
    Dim Uri As String = apiUri &amp; ApiEndPoints.GetNextIdDocumenti

    Using client = New HttpClient()
        Using response = Await client.GetAsync(Uri)
            If response.IsSuccessStatusCode Then
                Dim DocumentiIDJsonString = Await response.Content.ReadAsStringAsync()
                result = DocumentiIDJsonString.ToString()

            End If
        End Using
    End Using
    Return result
End Function
</code></pre>

<p>I'm trying to return the Document ID from the DB but I'm getting </p>

<blockquote>
  <p>System.Threading.Tasks.Task`1[System.String]</p>
</blockquote>

<p>Where actually it should return "2". Please help me on this: what am I doing wrong with this function?</p>

<p><strong>Update</strong></p>

<p>here is the function called:</p>

<pre><code> txtIDDoc_Detail.Text = ApiData.GetIdDoc().ToString()
</code></pre>

<p>But inside the textbox I'm getting the above text. thanks.</p>