webbrowser-control

WPF System.Windows.Controls.WebBrowser not rendering link buttons

*爱你&永不变心* 提交于 2020-01-15 11:17:43
问题 I have a web page that I display in a WPF WebBrowser control within a desktop application. I just updated the webpage to use styled buttons instead of the default gray buttons by changing from an asp.net Button type to an asp.net LinkButton and applying a CSS style to it: a.btnSave { background: url(Resources/Images/btnSave.png) no-repeat 0 0; display:inline-block; width: 75px; height: 23px; text-indent: -9999px; } a.btnSave:hover {background-position: 0 -23px;} a.btnCancel { background: url

Webbrowser in ASP.net

烂漫一生 提交于 2020-01-15 10:34:23
问题 i'm trying to use WebBrowser in ASP.net but i found an error from Thread WebBrowser webget = new WebBrowser(); webget.Navigate("aaaaaa"); HtmlDocument d = webget.Document; Console.WriteLine(d); Console.Read(); The error is : Unable to instantiate ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' because the current thread is not a single-threaded apartment (STA) thread. 回答1: this is an expected behavior as asp.net was designed for concurrency and will not mak any since using STA and this

Webbrowser in ASP.net

徘徊边缘 提交于 2020-01-15 10:32:28
问题 i'm trying to use WebBrowser in ASP.net but i found an error from Thread WebBrowser webget = new WebBrowser(); webget.Navigate("aaaaaa"); HtmlDocument d = webget.Document; Console.WriteLine(d); Console.Read(); The error is : Unable to instantiate ActiveX control '8856f961-340a-11d0-a96b-00c04fd705a2' because the current thread is not a single-threaded apartment (STA) thread. 回答1: this is an expected behavior as asp.net was designed for concurrency and will not mak any since using STA and this

Bring back mobile version of website in WebBrowser control for wp7?

限于喜欢 提交于 2020-01-14 06:20:32
问题 Is it possible to bring back web pages in a mobile format, if available, before showing the normal rendering of a web page? I noticed I was getting both when I used it. Or is this enabled by default? EDIT: For example in ie on the phone you can request to recieve webpages in a mobile version or desktop version. Is this option available to developers and if not what is the default for the control? 回答1: Sadly, there's no API for toggling this setting - and no easy way to intercept the outgoing

WebBrowser Control Mishandling Cookies when Internet Explorer is Open

不羁岁月 提交于 2020-01-14 03:59:13
问题 I'm building an application in C# that makes use of the WebBrowser control. This is loading a specific page (that I did not create) that uses a popup and a cookie that determines what the last "ID" searched for was. This all works fine, except when Internet Explorer is open in the background. When Internet Explorer is open in the background, the popup only goes to the first ID ever set. It would appear that the cookies aren't being stored properly when IE is open. Breakdown: User opens

WebBrowser Control (MFC) created in seperate thread working in Windows 7 and Vista, but Windows XP

久未见 提交于 2020-01-13 19:08:14
问题 I have CWnd in main thread, and a CWnd with a WebBrower control created in a seperate thread. This is necessary, because the WebBrowser navigates to urls which have javascripts running which will block the WebBrowser. So I with the WebBrowser control in a seperate thread I prevent the GUI Thread vom hang. Also I have done this in main thread in my application: CCustomOccManager *pMgr = new CCustomOccManager(); AfxEnableControlContainer(pMgr); That's for extending the WebBrowser control to my

SSL/TLS/HTTPS sites are very slow in a C#/.NET WebBrowser control, but fine in Internet Explorer

安稳与你 提交于 2020-01-13 18:19:09
问题 Background I'm modifying AutoWikiBrowser to work with a MediaWiki site hosted on a secure server. I allow the user to login manually via a WebBrowser control in a C# application, and then save the stored cookies for use in HttpWebRequest's. The Problem The problem I'm having is that any site which uses SSL/TLS (https:// urls) takes an incredibly long time to load, often timing out. I've tried this not only with the MediaWiki site in question, but also other secure sites like PayPal and secure

WebBrowser Control prevent Next Url navigated

余生颓废 提交于 2020-01-13 07:32:43
问题 I wonder if there is a anyway to remove the WebBrowser Message are you sure you want to navigate away from this page When I try to navigate another url, it happens. I tried this methods e.Cancel = False WebBrowser1.Dispose() WebBrowser1 = New WebBrowser WebBrowser1.ScriptErrorsSuppressed = True WebBrowser1.Navigate(New Uri("https://www.google.com")) 回答1: That is coded into the website, so you'd have to inject some Javascript into the page to override the prompt. Be careful with this, though.

How do I set Meteor to not cache anything for a specific page?

≡放荡痞女 提交于 2020-01-13 06:32:18
问题 I am working on a project where I am using Meteor as an implementation. There are set of pages that are being cached and there's no concern. However, there is one page in the project that I am trying to set for no-cache. How do I achieve that? EDITED: Based on chosen accepted answer; I achieved the desired result with this wrapping code: if (Meteor.isServer) { Meteor.startup(function () { WebApp.rawConnectHandlers.use(function (req, res, next) { res.setHeader('cache-control', 'no-cache'); res

How do I set Meteor to not cache anything for a specific page?

假装没事ソ 提交于 2020-01-13 06:32:07
问题 I am working on a project where I am using Meteor as an implementation. There are set of pages that are being cached and there's no concern. However, there is one page in the project that I am trying to set for no-cache. How do I achieve that? EDITED: Based on chosen accepted answer; I achieved the desired result with this wrapping code: if (Meteor.isServer) { Meteor.startup(function () { WebApp.rawConnectHandlers.use(function (req, res, next) { res.setHeader('cache-control', 'no-cache'); res