webbrowser-control

webbrowser class in asp.net website

这一生的挚爱 提交于 2019-12-11 06:29:10
问题 I have a requirement which needs to go to a webpage and take a screenshot of it. for this I have to create a ASP.NET so that the user can enter the website URL.. I was trying to create a web browser control.. but later realized I cant create web browser control in a asp.net website .. I am trying to do something like this http://pietschsoft.com/post/2008/07/C-Generate-WebPage-Thumbmail-Screenshot-Image.aspx can some one help me how to start of with this as i know we can only use web browser

C# webbrowser getElement in Thread

一世执手 提交于 2019-12-11 06:25:49
问题 I have the following code: private void button5_Click(object sender, EventArgs e) { HtmlElementCollection elc = webBrowser1.Document.GetElementsByTagName("div"); string text = "Out of sync ... stopping now!"; foreach (HtmlElement el in elc) { if (el.GetAttribute("id").Equals("double")) { if (el.InnerText != "") { text = el.InnerText; } } } MessageBox.Show(text); } I created this to test the functionality to click buttons on internet sites. Now i want to automate a few steps over and over,

HtmlElement doesn't parse the tag properly

拟墨画扇 提交于 2019-12-11 06:19:21
问题 I have the following line in my html source: <input class="phone" name="site_url" type="text" placeholder="Enter Your Website URL"> When I navigate using WebBrowser Control (C#) and load my site to an HtmlDocument object, and then loop over each HtmlElement, when I get to the input element above: I can't get the placeholder attribute. GetAttribute("placeholder") returns "". I checked the OuterHtml/InnerHtml fields and noted that placeholder attribute is copied with "" while other attributes

Gecko for windows forms and geolocation. How to accept request for share my location?

耗尽温柔 提交于 2019-12-11 06:06:10
问题 My main purpose is get my current geolocation. I've tried to do it with standart control "WebBrowser" but geolocation is not supported by it. So now I'm trying to implement Gecko wrapper https://code.google.com/p/geckofx/ and xulrunner-3.6.28.en-US.win32.sdk (or xulrunner-1.9.2.19.en-US.win32) to windows forms. It perfectly navigate to any url in windows forms. But I've problems to get current geolocation in it. It doesn't give me a window to accept "share my location" as any other browser

Determine if WPF WebBrowser is loading a page

懵懂的女人 提交于 2019-12-11 05:57:42
问题 I have a WPF System.Windows.Controls.WebBrowser control in a Window. A user can enter information and hit a submit button into the webpage displayed by the WebBrowser. After the page posts back it uses a scripting object to communicate with my application. I need to make sure that once the submit button has been pressed, the form doesn't close or otherwise stop waiting for the web page to post back. It would be great if I could check the state of the WebBrowser or its document via a property

Difference in using WindowsFormsHost over WebBrowser to view PDF files?

≯℡__Kan透↙ 提交于 2019-12-11 05:48:15
问题 I'm creating an application that will heavily use PDF file viewing. Is there a difference/advantage in using WindowsFormsHost over WebBrowser? WebBrowser is just a line of code versus WindowsFormsHost setup. So, I'm curious if there are any advantages of using WindowsFormsHost? 回答1: WPF WebBrowser control runs in IE protected mode by default, and Adobe PDF Reader plugin is known to have issues with that. Check this question. I'd go with WindowsFormsHost and host PDF Reader ActiveX directly,

Scrollable Height of System.Windows.Controls.WebBrowser

﹥>﹥吖頭↗ 提交于 2019-12-11 05:48:15
问题 I am using the System.Windows.Controls.WebBrowser control, and I need to get the height of the rendered html document. (Not the height of the control, the height of the content) The only height value I've found is WebBrowser.Document.body.offsetheight. However, this is the same value as the control's height. I know the height of the page must be stored someplace since the scroll bar knows the value. Everything I find in my searching has been about the Windows.Forms.WebBrowser. 回答1: Add COM

Is it possible to read / write a web page loaded in MS Edge from a separate process

笑着哭i 提交于 2019-12-11 05:35:41
问题 I realize this question isn't exactly up to SO's standards but I'm hoping someone can tell me I'm wasting my time or point me in the correct direction. I'm wondering if there was a low level API for manipulating a web page loaded in Edge. I'm working on an automation project that needs to be able to parse the DOM, inject elements, get / set input values from a separate process in real time. I have not been able to find ANYTHING online that suggests this is possible but I'm worried I might not

execCommand(“Print”, false, IDon'tUnderstandThisArgument)

邮差的信 提交于 2019-12-11 05:26:16
问题 What I'm trying to do is get this to print in landscape mode without showing the dialog box. This is what I have so far: ((mshtml.IHTMLDocument2)Browser.Document.DomDocument).execCommand("Print", true, 0); I know that the instruction to print in landscape mode needs to be sent through the third argument, but I don't know how to construct the third argument to do this. Can anyone give me some help on how to make this last argument accomplish my goal? 回答1: ADDITIONS: This is from Microsoft http

How to get hidden InnerHtml of web page that set by javascript?

做~自己de王妃 提交于 2019-12-11 04:42:00
问题 I know that I can get source of web page with this code: browser.DocumentText; some data of page filled by javascript innetHtml function and will not visible in browser.Text but in browser 's output is visible. How can I get source code of data that added by javascript to page? 回答1: If you know what type of tag contains the inner HTML you want to get at, you could do something like this (this example loops through the div tags, but you could do p, or table cells, or whatever):