webbrowser-control

HTTP/2.0 in browser: How does Browser cancel Server Push?

北战南征 提交于 2019-12-12 05:08:50
问题 I've read documentation of HTTP/2.0 and I know that it is possible to fully terminates the referenced stream by using the RST_STREAM frame. Here's (https://http2.github.io/http2-spec/)! How can I implement this feature in a web browser like Google Chrome or Firefox? 回答1: As a browser user or web app developer (HTTP/Javascript) you can't. There is no public API for this, or to interact with server push in general. The possibility to do this is probably implemented in the network stack of the

show asp menu in c# webbrowser

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 04:45:20
问题 I have developed a web browser in c# using System.Windows.Forms.WebBrowser But it doesn't show "asp:Menu" items at my pages. I've use this code in my asp project: <asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="default"/> <asp:MenuItem NavigateUrl="~/Exit.aspx" Text="exit"/> <asp:MenuItem NavigateUrl="~/Setting.aspx" Text="setting"/> </Items> </asp

C# webBrowser navigate to another page in pdf

喜欢而已 提交于 2019-12-12 04:44:07
问题 I have a C# winforms application that opens a pdf file in a webbrowser control. It opens to whatever page I want just fine however if I want to change page (go to a bookmark) the webbrowser stops working. I found this article which explains "Basically Webbrowser.Navigate(url) ONLY fires if the url changes. If it doesn't change it uses a cached version of the web page." however I am calling navigate with a Uri, not a string url like this: webBrowser.Navigate(new Uri(url)); My question is

Unable to set value to textBox control programatically in WebBrowser

丶灬走出姿态 提交于 2019-12-12 04:23:17
问题 I am trying to set a value programatically to a textbox in a web browser but it is throwing the Null exception. This is the code, I have tried:- webBrowser1.Document.GetElementById("field-summary").InnerText = "Something"; webBrowser1.Document.GetElementById("field-summary").SetAttribute("value", "Something"); I have tried to find the element by using the Quick Watch and it is there, but I am unable to set a value. Hereby, I have attached the snap of watch too. And this is the error, I am

How do I make the Delete key work in the WebBrowser control

夙愿已清 提交于 2019-12-12 03:56:57
问题 I have a .net Windows forms project that includes the System.Windows.forms.WebBrowser control to allow the user to do some editing of HTML content. When this control is in edit mode Elements such as div or span can be drag-and-drop edited, but selecting an element and typing Delete does nothing. I have seen a few posts that talk about making this work in C++ but they are not very detailed. Example http://social.msdn.microsoft.com/Forums/en-US/ieextensiondevelopment/thread/1f485dc6-e8b2-4da7

WebBrowser control chops off lower 25% of screen

走远了吗. 提交于 2019-12-12 03:42:05
问题 This is all there is to my code. I've tried moving the WindowState assignment to the Form1_Load procedure, but that doesn't make any difference. 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; namespace TestApp1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); WindowState = FormWindowState.Maximized;

collapse all elements for loaded xml in webbrowser control using c#

喜欢而已 提交于 2019-12-12 03:21:55
问题 I am using the System.Windows.Forms.WebBrowser to display XML in a syntax highlighted and easy to traverse format. Whenever I load the XML into the Control, I would like to have all the elements collapsed, is this possible? 回答1: This is triggered by the DocumentCompleted event handler. this was a useful link to help with java script injection: How to execute custom JavaScript in WebBrowser control? I used the following code. private void CollapseExpandDocument(object sender,

WP7 browser control won't invoke javascript Error 80020101

一世执手 提交于 2019-12-12 03:09:58
问题 I have the following: public MainPage() { webBrowser1.ScriptNotify += new EventHandler<NotifyEventArgs>(webBrowser1_ScriptNotify); } void webBrowser1_ScriptNotify(object sender, NotifyEventArgs e) { // ... some code ... webBrowser1.InvokeScript("nativeCallback", response.Serialize()); } The script notify is triggered when a user presses a button on the web page. I am trying to invoke the JavaScript below but i keep getting Error 80020101. <script type="text/javascript"> function

How to get a content of a page that updates too often using webbrowser in C#

痞子三分冷 提交于 2019-12-12 03:04:05
问题 I would like to get the latest content of a page that updates too often, for example, https://www.oanda.com/currency/live-exchange-rates/ (prices update every five second on weekdays) I am using the following code: var webBrowser = new WebBrowser(); webBrowser.ScriptErrorsSuppressed = true; webBrowser.AllowNavigation = true; webBrowser.Navigate("https://www.oanda.com/currency/live-exchange-rates/"); while (webBrowser.ReadyState != WebBrowserReadyState.Complete) { Application.DoEvents(); }

Windows Phone 8 SDK - Issue with screen locking, and application starting over

流过昼夜 提交于 2019-12-12 02:54:53
问题 I have an application with a webbrowser control in it. When I navigate in that control then step away for a bit, then come back to it (after unlocking the screen due to inactivity), the first/original page shows up again. How can I maintain the state of the browser? 回答1: Define a public property Url in App.xaml.cs to store an Url public Uri Url { get; set; } On WebBrowser_LoadCompleted event: save WebBrowser.Source property which contains the current loaded Url to above Url property of