如何从winform文本框触发网页文本框onclick事件

how to webpage textbox onclick event fire from winform textbox

我有以下代码,当我从我的 winform 文本框搜索并单击搜索按钮但网页文本框 onclick 事件未触发时。这该怎么做?这里是:http://www.heathrow.com/arrivals 当我点击搜索按钮页面仍然在相同位置时,显示在第二张图片中。我已经安装了 Internet Explorer 11

private void button2_Click(object sender, EventArgs e)
{
      HtmlDocument doc = webBrowser1.Document;
            HtmlElement HTMLControl2 = doc.GetElementById("searchInput");

            if (HTMLControl2 != null)
            {
                // HTMLControl2.Style = "display: none";
                HTMLControl2.InnerText = textBox1.Text;

                HTMLControl2.Focus();

                SendKeys.SendWait("{ENTER}");
                textBox1.Focus();

            }

}

代码如下:

Form1.cs:

private void textBox1_TextChanged(object sender, EventArgs e)
{
    HtmlDocument doc = webBrowser1.Document;
    HtmlElement HTMLControl2 = doc.GetElementById("searchInput");

    if (HTMLControl2 != null)
    {
        // HTMLControl2.Style = "display: none";
        HTMLControl2.InnerText = textBox1.Text;

        HTMLControl2.Focus();

        SendKeys.SendWait("{ENTER}");
        textBox1.Focus();

    }
}

其他都是默认值。

 HtmlDocument doc = webBrowser1.Document;
    HtmlElement HTMLControl2 = doc.GetElementById("searchInput");

    if (HTMLControl2 != null)
    {
        // HTMLControl2.Style = "display: none";
        HTMLControl2.InnerText = textBox1.Text;
                 SendKeys.Send("{ENTER}");
                textBox1.Focus();
               HTMLControl2.Focus();
                HTMLControl2.InnerText = textBox1.Text;
              SendKeys.Send("{ENTER}");
               textBox1.Focus();
              HTMLControl2.Focus();
}