title: How can I get the sourcecode and put it in my gridview?
body: <p>On buttonclick I want to load the url from cell(0) to webwiev2-component, and then when the loading ends, I want to add the sourcecode to cell(4). The goal is to be able to preload websites from a list.</p>
  <p>So far I have this, but it only adds System.Threading.Tasks.Task`1[System.String to cell(4) and doesnt wait for the site to load. All help is appreciated much.</p>
  <pre><code>        Dim preuri As Uri
          Dim src As String
          Dim rowindex As Integer
          rowindex = DataGridView1.CurrentCell.RowIndex
          Try
  
              'WebView22.Source = New Uri(&quot;https://&quot; + DataGridView1.Rows(rowindex).Cells(0).Value.ToString)
              src = WebView21.CoreWebView2.ExecuteScriptAsync(&quot;new XMLSerializer().serializeToString(document);&quot;).ToString
  
              src = System.Text.RegularExpressions.Regex.Unescape(src)
              src = src.Remove(0, 1)
              src = src.Remove(src.Length - 1, 1)
              DataGridView1.Rows(rowindex).Cells(4).Value = src
          Catch ex As Exception
          End Try
  
      End Sub```
  </code></pre>