webbrowser-control

Calling a Javascript function in the C# webBrowser control

I am using the webBrowser control in c# to load a webpage and need to call a JavaScript function that returns a string value. I got a solution to use the InvokeScript method, and i tried a lot , but everything got failed...... plz help me ...

C# Navigate to Anchors in WebBrowser control

We have a web browser in our Winforms app to nicely display history of a selected item rendered by xslt. The xslt is writing out <a> tags in the outputted html to allow the webBrowser control to navigate to the selected history entry. As we are not 'navigating' to the html in the strict web sense, rather setting the html by the Docume...

WebBrowser - Search using Search engine uri and Input Keyword?

How can use the WebBrowser control in WPF to navigate using Search engine uri and input key? For Example if I have the following function private void Search( Uri uri, string keyword ) { } How can I concatnate the Uri and keyword sucha as Uri = www.google.com and Keyword = WPF. I want the search result of 'WPF' in window? ...

Browser Word Document Editor

I've been looking at Adobe Buzzword and Zoho Writer and the functionality their editor controls provide is something that I need to incorporate into an application I'm working on. To be clear, I'm not looking for a WYSIWYG HTML editor like FCKEditor or the Telerik R.A.D controls editor. What I'm looking for is an editor that can creat...

WebBrowser control: how to suppress message: do you want to close this window

Hi, I'm new to WebBrowser control. In the current project, we use WebBrowser control to integrate with existing project. All popup windows are displayed in a new windows form. When "javascript window:close" is called on the popup window, the IE instance always prompt: do you want to close this window. We're using WndProce to check WM_Des...

Web Application:: Keep all forms in One tab or distrbute them to browser tabs?

Hi, My app has main desktop and many forms... like CRM. Every form is opened in a different tab(browser window) independent from the app. The forms contains a lot of DOM and jQuery events. One thing to note about is that the forms often need to open some child forms. I want to get some control over the opened forms/tabs. So in case w...

WinForm Web Browser Control Is Constantly Breaking Out Into New Windows

I am creating an application in C# that is essentially automating a submission process. I am using an arraylist of web browser to make it multi threaded. The browser windows are never displayed they are just in memory, and from there i navigate them, and submit the form on the document completed etc. And for the most part it works fine....

WPF WebBrowser events for HTTP errors?

I have a WPF application and I'm using the WebBrowser control to display some content from a public website. Sometimes in weird edge cases when the network connectivity is flakey, the web browser will show the "This program cannot display the webpage" error page. Is there some way to listen to the WebBrowser to detect when this occurs,...

Webbrowser Control Limitations

I am using the WebBrowser control in a windows form C# project and wanted to know if there are any limitations of how many instances of such application you can have running at the same time. (in other words does MSFT enforce any limitations other than physical machine limits - CPU/memory etc) ...

overriding GetSecurityId in IInternetSecurityManager

I have built an executable which launches a dialog box in which is embedded the IE web browser active-x control (C++). I want this control to allow cross site scripting. One frame on the web page loads local html, the other loads from a server. I then want the server page to call a javascript function that lives in the local html file...

How to retrieve HTML from Webbrowser control out of frames in .net (c#)

I know that I can get the HTML (source code) of a Webbrowser control via: HtmlDocument htmldoc = webBrowser1.Document But this does only provide the html code of the "parent page". In case the webpage uses frames, it does not return the html code for the whole page including frames. How can I get the complete HTML code including frame...

Detect If Offline - in C# WebBrowser component?

We're working on a wrapped WebBrowser component. We'd like to display one page (e.g. oursite.com/thispage.html) if the user is online and another page (e.g. C:\somewhere\thispage_offline.html) if the user is offline. I'm able to to properly display both pages, but my issue is detecting the online/offline status. I tried WebBrowser.Is...

How do I copy a DOM sub tree between two webbrowser.HmtlDocuments?

A WinForm application. I want to scrape a part of an HTML web page and save it into a local html file. I have one local file, "empty.htm" (containing just "I'm empty" in the body), one remote web page, and two WebBrowser controls. WebBrowser1 navigates to the remote page, WebBrowser2 to the local file. Both display their content appro...

How do I click an ASP.NET webform's button when the page is hosted in a WebBrowser Control

I have a standard ASP.NET web form in a web page, and this page is hosted in a .NET Winform with a WebBrowser Control. Using c# how do I control the WebBrowser Control to submit the ASP.NET form? (eg somehow "clicking" on the button from the Winform?) Update: to complicate things we have the ASP.NET validators which seem to make simple ...

How to force JavaScript to be enabled in an embedded WebBrowser control?

I have a C++ application that embeds Internet Explorer as a WebBrowser control. The content I show in that control relies on JavaScript being enabled, but if the user has disabled JavaScript in their Internet Explorer security settings, it's disabled in my embedded control as well. How can I ensure that JavaScript is enabled for my emb...

How can I disable JavaScript warnings in the WebBrowser control?

I'm using the WebBrowser control and mshtml.dll. When I simulate click on link <a href='..'>..</a>, the WebBrowser shows a JavaScript warning dialog: Unable to move the focus to the element as it is in the invisible ,off or can't have a focus. The code I use to simulate the click: anchor.click(); ...where anchor has the type: ...

Raw HTML - how to measure width/height on the server?

I have a web application that lets users upload entire .html files to my server. I wish to 'detect' the width/height of the uploaded html and store it in my DB. So far, I have unsuccessfully tried using the System.Windows.Forms.WebBrowser control - by reading the file into a string, loading it into the browser.document: _browser = ne...

Help with a Windows Service/Scheduled Task that must use a web browser and file dialogs

What I'm Trying To Do I'm trying to create a solution of any kind that will run nightly on a Windows server, authenticate to a website, check a web page on the site for new links indicating a new version of a zip file, use new links (if present) to download a zip file, unzip the downloaded file to an existing folder on the server, use t...

How to minimize form from a click on a webbrowser control.

I've got a winform with a webbrowser control. The URL is a web page containing a java applet showing my web cam. What I'd like to do is minimize the form when I click anywhere in the region of the webbrowser control / webcam image. I tried messing around with transparent buttons but could not get anything to work. Since there is no OnCli...

how to browse web site with script to get informations...

I need to write a script that go to a web site, logs in, navigates to a page and downloads (and after that parse) the html of that page. What I want is a standalone script, not a script that controls Firefox. I don't need any javascript support in that just simple html navigation. If nothing easy to do this exists.. well then something...