System.InvalidCastException:'指定的强制转换无效。错误

时间:2018-06-22 09:34:16

标签: vb.net

我想在带有HTML代码的文本框中将某些内容放入网页文本区域

<input class="input-block-level" type="text" name="notification_address" id="notification_address" autocomplete="true" spellcheck="false" placeholder="Email Address" value="">

我收到错误消息“播放无效”

我尝试过的代码:

Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
     Me.WebBrowser1.Navigate("website")
     WebBrowser1.Document.GetElementById("notification_address").SetAttribute("value", TextBox1.Text)
End Sub

仅当我在按钮单击代码中顺利执行此操作时,才在后台工作程序中执行代码时发生错误。

0 个答案:

没有答案