title: C# Form - Cefsharp get Data from Javascript
body: <p>I wrote some Code in Visual Studio 2015 C# with the NuGet Extension Cefsharp. It let you implement a Chromium Browser for Forms.</p>
  
  <p>What I need is, to get some Data, from the Website the Browser is on. I want to read out a Tag and save the value in a string variable, then Parse it to a Double.</p>
  
  <p>There are a few tutorial's out there - but I really dont understand the clue with the EvaluateScriptAsync() Function. I tryed everything. I dont get Errors, but neither I get the value I want in a Variable.</p>
  
  <p><a href="https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#CallJSWithResult" rel="nofollow noreferrer">https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#CallJSWithResult</a></p>
  
  <p>This is the FAQ. At point 2. is the Stuff I need. For more detail, i post a example Code:</p>
  
  <hr>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.ComponentModel;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  using CefSharp;
  using CefSharp.WinForms;
  
  namespace WindowsFormsApplication2
  {
  public partial class Form1 : Form
  {
  
      public ChromiumWebBrowser chromeBrowser;
  
      public Form1()
      {
          InitializeComponent();
          InitializeChromium();
      }
  
      private void InitializeChromium()
      {
  
          CefSettings settings = new CefSettings();
          Cef.Initialize(settings);
          chromeBrowser = new ChromiumWebBrowser("https://demo.trading212.com");
          this.Controls.Add(chromeBrowser);
          chromeBrowser.Dock = DockStyle.Fill;
  
      }
  
      public void Dev_Click(Object sender, EventArgs e)
      {
          chromeBrowser.ShowDevTools();
      }
  
      System.Threading.Thread t;
      private void Form1_Load(object sender, EventArgs e)
      {
          //THREADY MC SPEEDY
          t = new System.Threading.Thread(DoThisAllTheTime);
          t.Start();
      }
  
  
      private void Form1_FormClosing(object sender, FormClosingEventArgs e)
      {
          Cef.Shutdown();
      }
  
  
      public void DoThisAllTheTime()
      {
          while (true)
          {
               // HERE I WANT CODE WHICH IS ABLE
               // TO GET DATA FROM HTML (JS) AND
               // SAVE IT INTO C# VARIABLE
      }
  
      private void Stopy_Click(object sender, EventArgs e)
      {
          t.Suspend();
      }
  
  
  
  
  
  
  }
  </code></pre>
  
  <p>}</p>
  
  <hr>
  
  <p>At least, it's very basic code.</p>
  
  <p>Can someone who have a working solution, please explain me how it works, and what I have exactly to do? Would be great, because how I said - I dont understand all the tutorials out there, and they dont worked for me.</p>
  
  <ul>
  <li>Cheers</li>
  </ul>