#c# #winforms #webview #webbrowser-control #webview2
#c# #winforms #webview #веб-браузер-контроль #webview2
Вопрос:
Я новичок в webview2, у меня проблема с добавлением некоторых html-элементов в таблицу в html с помощью executeScriptAsync это код на C# :
public Form1() { InitializeComponent(); InitializeAsync(); } private async void InitializeAsync() { var env = await CoreWebView2Environment.CreateAsync(userDataFolder: Path.Combine(Path.GetTempPath(), "MarkdownMonster_Browser")); await webView21.EnsureCoreWebView2Async(env); webView21.CoreWebView2.DOMContentLoaded = CoreWebView2_DOMContentLoaded; webView21.Source = new Uri(@"C:UserskjankyDesktopChatWindowHTML.html"); string s = System.IO.File.ReadAllText(@"C:UserskjankyDesktopNew Text Document.txt"); var json = JsonConvert.SerializeObject(s); webView21.CoreWebView2.OpenDevToolsWindow(); } private async void CoreWebView2_DOMContentLoaded(object sender, CoreWebView2DOMContentLoadedEventArgs e) { // Now it's safe to interact with the DOM string s = System.IO.File.ReadAllText(@"C:UserskjankyDesktopNew Text Document.txt"); s = JsonConvert.SerializeObject(s); await webView21.ExecuteScriptAsync($"addMessageRowNew({s})"); } }
документ, который я хочу добавить в таблицу в формате html:(я прочитал его из файла txt)
lt;tr id='202111241525440369' onmouseover='visiblepointmenu("202111241525440369");' onmouseout='hidepointmenu("202111241525440369");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;IMG class='theimage' draggable='false' src='C:UserskjankyAppDataLocalViva_Client387608HistoryThumbProfPicsRoundWithoutStatus387283.png'gt;lt;/tdgt;lt;td class='td_center' id='Forward202111241525440369' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:left; font-size: 11px; 'gt;khaled, 03:25 PMlt;/divgt;lt;div id='menu202111241525440369' class='bubble-left' oncontextmenu='window.external.Menu("pointMenu#2","زززز", "202111241525440369");' gt;lt;P style='table-layout:fixed; text-align:right;'gt;زززز lt;/pgt;lt;/divgt;lt;div style='float:right;'gt;lt;img id='pnt202111241525440369' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "زززز", "202111241525440369");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;visibility:hidden;display:none;' id='read202111241525440369' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIRJREFUKFOVj0ERgDAMBCuhJvhXAhKQgAQkIAEJvFGBBCzgoA5CjmmYQDIUHju9Xm8fDUT0G7es4ZY13LKGWwrNsicmM6vKozsGagR6lZMMWiaqLAIxU8mngI1IeNyYWLJgBC3NjIgiIBvhkh4iwMdxGgHcLjzAh7uSB08ApviCW75D4QBh7dcJ7Ox/ngAAAABJRU5ErkJggg=='/gt;lt;/tdgt;lt;/trgt;lt;tr id='202111241525479513' onmouseover='visiblepointmenu("202111241525479513");' onmouseout='hidepointmenu("202111241525479513");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;/tdgt;lt;td class='td_center' id='Forward202111241525479513' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:right; font-size: 11px; 'gt;03:25 PMlt;/divgt;lt;div id='menu202111241525479513' class='bubble-right' oncontextmenu='window.external.Menu("pointMenu#2","bvjvjvrnu0026#160;", "202111241525479513");' gt;lt;P style='table-layout:fixed; 'gt;bvjvjv lt;BRgt;amp;#160; lt;/pgt;lt;/divgt;lt;div style='float:left;'gt;lt;img id='pnt202111241525479513' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "bvjvjvrnu0026#160;", "202111241525479513");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;' id='read202111241525479513' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIBJREFUKFOVz1ENgDAMBFAkTMokIAEJMwABB0hAEhKQgAQclF6yI4U1DD5echy9EBoR c0ta9yyxi1r3JL6YYrqUKvJs3sM5kjUkjNEHrQqmAzuADcc4eWmQs5UDOwoKQ75hd3kloNr9BgCfpw52QHcHvSgg5xH5qei MIt30lzAsg5wpO5/4C8AAAAAElFTkSuQmCC'/gt;lt;/tdgt;lt;/trgt;lt;tr id='202111241530039530' onmouseover='visiblepointmenu("202111241530039530");' onmouseout='hidepointmenu("202111241530039530");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;IMG class='theimage' draggable='false' src='C:UserskjankyAppDataLocalViva_Client387608HistoryThumbProfPicsRoundWithoutStatus387283.png'gt;lt;/tdgt;lt;td class='td_center' id='Forward202111241530039530' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:left; font-size: 11px; 'gt;khaled, 03:30 PMlt;/divgt;lt;div id='menu202111241530039530' class='bubble-left' oncontextmenu='window.external.Menu("pointMenu#2","تن", "202111241530039530");' gt;lt;P style='table-layout:fixed; text-align:right;'gt;تن lt;/pgt;lt;/divgt;lt;div style='float:right;'gt;lt;img id='pnt202111241530039530' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "تن", "202111241530039530");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;visibility:hidden;display:none;' id='read202111241530039530' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIRJREFUKFOVj0ERgDAMBCuhJvhXAhKQgAQkIAEJvFGBBCzgoA5CjmmYQDIUHju9Xm8fDUT0G7es4ZY13LKGWwrNsicmM6vKozsGagR6lZMMWiaqLAIxU8mngI1IeNyYWLJgBC3NjIgiIBvhkh4iwMdxGgHcLjzAh7uSB08ApviCW75D4QBh7dcJ7Ox/ngAAAABJRU5ErkJggg=='/gt;lt;/tdgt;lt;/trgt;lt;tr id='202111241543074933' onmouseover='visiblepointmenu("202111241543074933");' onmouseout='hidepointmenu("202111241543074933");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;/tdgt;lt;td class='td_center' id='Forward202111241543074933' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:right; font-size: 11px; 'gt;03:43 PMlt;/divgt;lt;div id='menu202111241543074933' class='bubble-right' oncontextmenu='window.external.Menu("pointMenu#2","bbybybrnu0026#160;", "202111241543074933");' gt;lt;P style='table-layout:fixed; 'gt;bbybyb lt;BRgt;amp;#160; lt;/pgt;lt;/divgt;lt;div style='float:left;'gt;lt;img id='pnt202111241543074933' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "bbybybrnu0026#160;", "202111241543074933");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;' id='read202111241543074933' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIRJREFUKFOVj0ERgDAMBCuhJvhXAhKQgAQkIAEJvFGBBCzgoA5CjmmYQDIUHju9Xm8fDUT0G7es4ZY13LKGWwrNsicmM6vKozsGagR6lZMMWiaqLAIxU8mngI1IeNyYWLJgBC3NjIgiIBvhkh4iwMdxGgHcLjzAh7uSB08ApviCW75D4QBh7dcJ7Ox/ngAAAABJRU5ErkJggg=='/gt;lt;/tdgt;lt;/trgt;lt;tr id='202111241547089154' onmouseover='visiblepointmenu("202111241547089154");' onmouseout='hidepointmenu("202111241547089154");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;/tdgt;lt;td class='td_center' id='Forward202111241547089154' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:right; font-size: 11px; 'gt;03:47 PMlt;/divgt;lt;div id='menu202111241547089154' class='bubble-right' oncontextmenu='window.external.Menu("pointMenu#2","hyhyhyhrnu0026#160;", "202111241547089154");' gt;lt;P style='table-layout:fixed; 'gt;hyhyhyh lt;BRgt;amp;#160; lt;/pgt;lt;/divgt;lt;div style='float:left;'gt;lt;img id='pnt202111241547089154' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "hyhyhyhrnu0026#160;", "202111241547089154");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;' id='read202111241547089154' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIBJREFUKFOVz1ENgDAMBFAkTMokIAEJMwABB0hAEhKQgAQclF6yI4U1DD5echy9EBoR c0ta9yyxi1r3JL6YYrqUKvJs3sM5kjUkjNEHrQqmAzuADcc4eWmQs5UDOwoKQ75hd3kloNr9BgCfpw52QHcHvSgg5xH5qei MIt30lzAsg5wpO5/4C8AAAAAElFTkSuQmCC'/gt;lt;/tdgt;lt;/trgt;lt;trgt;lt;td class='td_left' nowrap='nowrap' align='right'gt;lt;/tdgt; lt;td style='width: 85%;'gt;lt;div style='height: 10px; border-bottom: 1px solid #DFDFDF;text-align:center;'gt;lt;div class='abc' style='visibility:visible;display:block;'gt;lt;span style='margin-bottom: 50px; color:#8A8D91 ;font-size: 12px; background-color:white; padding: 0 10px;'gt;Thursdaylt;/spangt;lt;/divgt;lt;div class='abc_ar' style='visibility:hidden;display:none;'gt;lt;span style='margin-bottom: 50px; color:#8A8D91 ;font-size: 12px; background-color :white; padding: 0 10px;'gt;الخميسlt;/spangt;lt;/divgt;lt;/divgt;lt;/tdgt;lt;td class='td_right' align='right'gt;lt;/tdgt;lt;/trgt;lt;tr id='202111250819044130' onmouseover='visiblepointmenu("202111250819044130");' onmouseout='hidepointmenu("202111250819044130");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;/tdgt;lt;td class='td_center' id='Forward202111250819044130' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:right; font-size: 11px; 'gt;08:19 AMlt;/divgt;lt;div id='menu202111250819044130' class='bubble-right' oncontextmenu='window.external.Menu("pointMenu#2","vrgrrggrrnu0026#160;", "202111250819044130");' gt;lt;P style='table-layout:fixed; 'gt;vrgrrggr lt;BRgt;amp;#160; lt;/pgt;lt;/divgt;lt;div style='float:left;'gt;lt;img id='pnt202111250819044130' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "vrgrrggrrnu0026#160;", "202111250819044130");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;' id='read202111250819044130' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIRJREFUKFOVj0ERgDAMBCuhJvhXAhKQgAQkIAEJvFGBBCzgoA5CjmmYQDIUHju9Xm8fDUT0G7es4ZY13LKGWwrNsicmM6vKozsGagR6lZMMWiaqLAIxU8mngI1IeNyYWLJgBC3NjIgiIBvhkh4iwMdxGgHcLjzAh7uSB08ApviCW75D4QBh7dcJ7Ox/ngAAAABJRU5ErkJggg=='/gt;lt;/tdgt;lt;/trgt;lt;TR id='202111250819404750' onmouseover='visiblepointmenu("202111250819404750");' onmouseout='hidepointmenu("202111250819404750");'gt;lt;td class='td_left' nowrap='nowrap' align='right' style='padding-top: 5px;'gt;lt;/tdgt;lt;td id='202111250819404750' class='td_center' style='table-layout:fixed;direction: rtl;' gt;lt;table cellpadding='0' cellspacing='0'gt;lt;TR style='HEIGHT:10px; display: none;visibility: hidden;'gt;lt;TD style='width:300px;' class='td_right'gt;lt;div style='text-align:right; font-size: 11px;'gt;08:19 AMlt;/divgt;lt;/TDgt;lt;TDgt;lt;/TDgt;lt;/TRgt; lt;TR style='HEIGHT:36px;'gt;lt;td style='display:inline-block;'gt;lt;div id='SharedContact202111250819404750' class='SharedContact' dir='ltr' oncontextmenu='window.external.Menu("pointMenu#5", " ", "202111250819404750");'onclick="window.external.SharedContact_Click('Ahmed Khair J','','0096171803171;','','','')"gt;lt;div class='ImageDiv'gt;lt;img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA3CAYAAACo29JGAAAAIGNIUk0AAHolAACAgwAA f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAYNSURBVGhD3Vr7T1xFFN6/wPSf8DfeWG3UxoZCeSmJSNXlsZa2lFQSiTa0tkFJNKGxoNFIhBobK/iDLZpoKjXRmhhjsKVJiZXUouW1SwNsgaXy2mWB4/kus 3uclh27x1g8Uu 3JnDnZlzmDlzzsxdGxFpZV9f36Mul vM2NhY5 Tk5PDs7Oz8wsLC0vLyMv ZCE/UWe71eDyj/N5VvI92gT50URTGyoGBgdSRkZHvp6enZwNGxAq0Q3vupwP9sUgcKxaKwmg5ODhYzrMzYtagtYD 0C/656o4djQUheuRB82fmpq6x UNB8bBeFwUdYlEUbgW2S92wJeWlpa4unnAeDzu7xifq6JuEkWhRPaDPGwOXN4yYHzowUVRx3CKwnA6nc6Ti4uLeh3LJKAH9OGiqGswRWEwh4eHmzZ7Ga4H6AO9uCjqHKAoDJA7 ISfcQuln6g7KApBnvoTurd43cAMRlqiopCddm 8 Nh6gJ7Ql4ur7Fgl4O32kZmZmVkubxtAX jNxRBbQiog4gk/tx2U3iG2hFQQQ JtZ4wW2B/CY2CIcZuVUm0UWP9xfqw2TiWp2jE 4aHW9g4qe62OMvYfpd3PV1Dh4RpqbPmS/hlwqrf0ITjZfmAcsnB asXt/iEqr66jx3IdIvPKXqeu7j/V23qg7HhoHK/VdB0xLbiHyakpKqo6RWn7SkXDDOY56DlHNd2fnlGtrEP5XjoXV4zDAdH4i0Zc bWTUtmw9Jwy2TAm/paaXUrtl66oVnqg7FkxTndcm/d66XTTOUrMKBaNCib AfuPvElz817V2jqUPTZbf39/0opIH 5NTJKj m1KzioRDQrn7sJKujPgUq2tA0sTdzI2l8vVqGTaMOIep6IjNZSSFcHfgvg076DdPb2qtR6wXQ3ISDpVXRsmPPfp1ZP1lJS5/syl5zhoT1El3R11q9Z6wHZdQwi4q qmEb7PLvj91Nx6gRIy7KJBwUzOLKbK4/Xk9y q1nrg8XjGbDquDqQg0tX9B89csbEbSkaBaTmllLzXTtdu9KhW oB7URsuSFXdNGBcuIFer48 LTVMHCtcJCQ8TKdbfuGjy3681mfz7do03UglXpBSHj/7BeUYsS7h0btVIbVnmnWGsCDgXMe4px24B92q/cOnf74HBVW1ITMVoCIbwXlx6jp8wvUw 9uxOxZnrnw1j7fAn3d8SM9WXBoZUnmRs5QEtnn0vh5/uIlrYHcmDmrPhdsHPdFLW3tHLxLKS3CRhJMLFG8m8jLtK6xhaY1JUuGz5ndLaX5/uq7y7y1l6y5gURiWnYZJex5iY9CbeyrPtWjeRi7pY44B/Tc7qVdBQcNX5KUj4aYwRRO2Tp /k31ah5GnNORoXh9PjpR/5HhY5LSsRA ELFcc5PPap3czAyFB25ZXfPX5z8VliatQDTmchaMHtWtjojt RTQYqqmwIUOH/xW2MTMeNrEpMy7fTGOx8acdIMHpwKuIzz3NyKOHbMzc9T7XtNxkYiKWqG8L2MF4 aXprKHusn8VE 3hw69i7nkHpmzSCvAMTHm7f VqPEhpCTuJU7lAHnMBUhC8k7wHxFD/MPUNq EvrBxK4JO0LuUECzt1 eqX/JUVXLm4mdfQ5 Z52p2SWU Ewhdd24qUaJHhwCQm /QCv3lj/9cpXyS6toZ7adnsgppl25Jab5OPfx1LMOamj6zNSGIt5bgurGdttizRtnEHftVhPprQL0Dv/VQ4hxoPpasu2g9A6xJaQCqu9zpuPeVgD6RvV9DuTlud2 rGZxcZUdqwQBOp3OU/Huf qbeC0XRRtEYYD/218zBIjfe8Tb11asKNarmYuizgGKwnDy1L8VLz4IPaAPF0VdgykKJSIG4ujO5S0DxoceXBR1DKcoXIu83e5wu93XN3ujwXgYF NzVdRNoihcj5wJ2DcrVcM4GI Loi6RKAqj5dDQ0GFk4bpnEv2hX 7/IFfFsaOhKIyV7Af4jfNlfNE0ayjaIdNAP iPReJYsVAUWiHuLnA5g1s1XBviXtTn8y35/X7DajxRx bAs Pm9/Dr9Aa0C 7HOsn2HyOPdl/UERTEAAAAAElFTkSuQmCC' id ='SharedContactImage202111250819404750' class='SharedContactImage' gt;lt;/divgt;lt;div class='SharedContactInformation'gt;lt;label id='SharedContactName202111250819404750' class='SharedContactName'gt;Ahmed Khair J lt;/labelgt;lt;/divgt;lt;div class='HorizentalLineSeperator'gt;lt;/divgt;lt;button id='SharedContactChatButton202111250819404750' class='SharedContactButtons' onclick="window.external.SharedContact_ChatButton(387187)"gt;Chatlt;/buttongt;lt;div id='VerticalLineSeperator202111250819404750' class='VerticalLineSeperator'gt;lt;/divgt;lt;button id='SharedContactAddButton202111250819404750' class='SharedContactButtons' onclick="window.external.SharedContact_AddButton(387187, 387608,9511115,'','','Ahmed Khair J','')"gt;Addlt;/buttongt;lt;button id='SharedContactInviteButton202111250819404750' class='SharedContactInviteButton'gt;Inivite to VIVA Clientlt;/buttongt;lt;/divgt;lt;stylegt;#SharedContactChatButton202111250819404750 {width: 100%;}#SharedContactAddButton202111250819404750 {display: none;}#VerticalLineSeperator202111250819404750{display: none;}#SharedContact202111250819404750 {background: #F4F4F7;}lt;/stylegt;lt;/tdgt;lt;td style='vertical-align:top;'gt;lt;div style='float:left;'gt;lt;img id='pnt202111250819404750' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#5", " ", "202111250819404750");' /gt;lt;/divgt;lt;/tdgt;lt;/TRgt;lt;/tablegt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img id='read202111250819404750' style='margin-top: 3px;' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIBJREFUKFOVz1ENgDAMBFAkTMokIAEJMwABB0hAEhKQgAQclF6yI4U1DD5echy9EBoR c0ta9yyxi1r3JL6YYrqUKvJs3sM5kjUkjNEHrQqmAzuADcc4eWmQs5UDOwoKQ75hd3kloNr9BgCfpw52QHcHvSgg5xH5qei MIt30lzAsg5wpO5/4C8AAAAAElFTkSuQmCC' /gt;lt;/tdgt;lt;/trgt;lt;tr id='202111251127394061' onmouseover='visiblepointmenu("202111251127394061");' onmouseout='hidepointmenu("202111251127394061");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;/tdgt;lt;td class='td_center' id='Forward202111251127394061' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:right; font-size: 11px; 'gt;11:27 AMlt;/divgt;lt;div id='menu202111251127394061' class='bubble-right' oncontextmenu='window.external.Menu("pointMenu#2","cfcfcrnu0026#160;", "202111251127394061");' gt;lt;P style='table-layout:fixed; 'gt;cfcfc lt;BRgt;amp;#160; lt;/pgt;lt;/divgt;lt;div style='float:left;'gt;lt;img id='pnt202111251127394061' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "cfcfcrnu0026#160;", "202111251127394061");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;' id='read202111251127394061' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIRJREFUKFOVj0ERgDAMBCuhJvhXAhKQgAQkIAEJvFGBBCzgoA5CjmmYQDIUHju9Xm8fDUT0G7es4ZY13LKGWwrNsicmM6vKozsGagR6lZMMWiaqLAIxU8mngI1IeNyYWLJgBC3NjIgiIBvhkh4iwMdxGgHcLjzAh7uSB08ApviCW75D4QBh7dcJ7Ox/ngAAAABJRU5ErkJggg=='/gt;lt;/tdgt;lt;/trgt;lt;tr id='202111251128347740' onmouseover='visiblepointmenu("202111251128347740");' onmouseout='hidepointmenu("202111251128347740");'gt;lt;td class='td_left noselect' nowrap='nowrap' align='right' draggable='false' gt;lt;IMG class='theimage' draggable='false' src='C:UserskjankyAppDataLocalViva_Client387608HistoryThumbProfPicsRoundWithoutStatus387283.png'gt;lt;/tdgt;lt;td class='td_center' id='Forward202111251128347740' style='table-layout:fixed;'gt;lt;div class='noselect' style='color: DarkGray; text-align:left; font-size: 11px; 'gt;khaled, 11:28 AMlt;/divgt;lt;div id='menu202111251128347740' class='bubble-left' oncontextmenu='window.external.Menu("pointMenu#2","تت", "202111251128347740");' gt;lt;P style='table-layout:fixed; text-align:right;'gt;تت lt;/pgt;lt;/divgt;lt;div style='float:right;'gt;lt;img id='pnt202111251128347740' class='noselect' draggable='false' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAFtJREFUKFNj P//P8kYq2BuXqEAEAdgkwNhrIJADReA D8ujRgCIAxUnADVKIBNHkOAGIxVkCyboBpI9hNZoQfSVIBNDoSxCgI1wJyHVSOGAAgDFdMpyPHj/wwAaF7b svPFkkAAAAASUVORK5CYII=' style='visibility:hidden;display:none;' onclick='window.external.Menu("pointMenu#2", "تت", "202111251128347740");' /gt;lt;/divgt;lt;/tdgt;lt;td style='width:17px;' valign='top' align='left'gt;lt;img style='margin-top: 3px;visibility:hidden;display:none;' id='read202111251128347740' draggable='false' class='noselect' src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6 R8AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1 /AAAAIRJREFUKFOVj0ERgDAMBCuhJvhXAhKQgAQkIAEJvFGBBCzgoA5CjmmYQDIUHju9Xm8fDUT0G7es4ZY13LKGWwrNsicmM6vKozsGagR6lZMMWiaqLAIxU8mngI1IeNyYWLJgBC3NjIgiIBvhkh4iwMdxGgHcLjzAh7uSB08ApviCW75D4QBh7dcJ7Ox/ngAAAABJRU5ErkJggg=='/gt;lt;/tdgt;lt;/trgt;lt;TR id='202111251128511144' onmouseover='visiblepointmenu("202111251128511144");' onmouseout='hidepointmenu("202111251128511144");'gt;lt;td class='td_left' nowrap='nowrap' align='right' style='padding-top: 5px;'gt;lt;/tdgt;lt;td id='202111251128511144' class='td_center' style='table-layout:fixed;direction: ltr;' gt;lt;table cellpadding='0' cellspacing='0' gt;lt;TR style='HEIGHT:10px; display: none;visibility: hidden;'gt;lt;TD style='width:186px;' class='td_right'gt;lt;div style='text-align:left; font-size: 11px;'gt;11:28 AMlt;/divgt;lt;/TDgt;lt;TDgt;lt;/TDgt;lt;/TRgt;
это функция JavaScript, которую я пытаюсь выполнить, и таблица, которую я хочу добавить
lt;scriptgt; function addMessageRowNew(html) { $('#tbl_body').append(html); } lt;/scriptgt; lt;body class="aaa" dir="ltr" lang="en" style="font-size: 12px;font-family: 'Tahoma';" ondragover="allowDrop(event);" ondragstart="return false;"gt; lt;div id="containerDiv" style="border:double; background-color:white; "gt;lt;!--position:relative;height: 100%;--gt; lt;img id="page-background" src="" width="100%" height="100%"gt; lt;!--lt;div style="position:absolute; bottom:5px;" gt;--gt; lt;table style="TABLE-LAYOUT: fixed;" id="container"gt; lt;!--lt;table id="container" border="1" style="overflow:scroll;"--gt; lt;trgt; lt;td valign="bottom"gt; lt;table cellpadding="0" cellspacing="7" id="tbl_body"gt; lt;!--id="mcs-top"--gt; lt;!--lt;tr style='height:27px;'gt; lt;td nowrap="nowrap" class='td_left' id='test'gt; Omar Maghmoumeh lt;/tdgt; lt;td class='td_center'gt; Hello World lt;/tdgt; lt;td nowrap="nowrap" class='td_right'gt; 11:10 lt;/tdgt; lt;/trgt;--gt; lt;/tablegt; lt;/tdgt; lt;/trgt; lt;/tablegt; lt;!--lt;/divgt;--gt; lt;/divgt; lt;!--lt;div id="ChatInputBox"gt; lt;div id="ChatInputBox-content"gt; lt;//input id="Text1" name="Text1" type="text" value="Text1Value" /gt; lt;/divgt; lt;/divgt;--gt; lt;/bodygt;
Комментарии:
1. Вы пробовали пройти через код? Зачем ты звонишь
JsonConvert.SerializeObject(s);
? — у тебя уже есть строка, не так ли, ДЖСОН ?2. В чем проблема?
3. Я не могу вызвать функцию из c# с помощью executescriptAsync, но когда я ввожу точную строку в html, она регулярно вызывается @rfmodulator