webview21 value doesn't work with textbox HELP ME

Darli xcx 21 Reputation points
2022-05-23T18:56:09.92+00:00

I'm trying to make the value of webview writable with TEXTBOX, but it doesn't work

WebView21.ExecuteScriptAsync("document.getElementById('msn').value = TextBox1.Text;")

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,570 questions
0 comments No comments
{count} votes

Accepted answer
  1. Viorel 112.1K Reputation points
    2022-05-23T19:24:51.007+00:00

    Try this:

    ā€ƒWebView21.ExecuteScriptAsync("document.getElementById('msn').value = 'TEST' ")

    Then try this:

    ā€ƒWebView21.ExecuteScriptAsync("document.getElementById('msn').value = '" & TextBox1.Text.Replace("'", "\'") & "'")


0 additional answers

Sort by: Most helpful