.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Write a web browser WITHOUT using WebBrowser control.

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :Windows Application
 

Hi All,

I have a unique project in mind which is based on a web browser, but requires that I perform some of the actions that the WebBrowser control does instead.

Basically, I want to be able to intercept/handle the web browser's requests and return data to the control which outputs the data to the clients screen.

For example:

1) A client requests a page.
2) My code handles this request and returns the HTML to the control.
3) The control then sends requests for each component which makes up the page (images, etc) and sends the requests to my handler.
4) My handler gets the data and returns it to the control.

Is there a way I can achieve this?

Thanks
Anubis. 


If you already know the candle light is fire, the meal was cooked a long time ago...


View Complete Post


More Related Resource Links

Opening links from WPF WebBrowser control in default browser instead of IE

  
I am working on a WPF application that uses System.Windows.Controls.WebBrowser to display an embedded HTML page.
The problem I have is that all links from that page that are to open an external browser window (with target="_blank") open Internet Explorer instead of the configured default browser.
How do I tell the WebBrowser control to respect the default browser settings?

Explorer Browser Control

  
I am having a problem with the Explorer Browser sample code from Windows 7 API Code Pack. I need to programmatically highlight and give focus to an item in the left hand pane of an Explorer Browser control just as if I had clicked on it. "eb.ExplorerBrowserControl.Navigate(   CType(KnownFolders.Computer, ShellObject))" will highlight it but will not give it focus.  How do I simulate in code what happens when I acutally click on 'Computer' in the left-hand pane? Then how do I send the Tab Key?  Will this work? "SendKeys.Send("{TAB}")"

How to open an excel document in a webbrowser control

  
Hi,  I have an XBAP app that we would like to be able to open an Excel doc in a WebBrowser control but instead we always get prompted to opne in Excel.  Is this possible?  Here is what I have tried.  The reports are in SharePoint but we want to show them in our own application not SharePoint.       System.Windows.Forms.WebBrowser ReportView = new System.Windows.Forms.WebBrowser();     WindowsFormsHost ReportViewHost = new WindowsFormsHost(); ReportView.Navigate(_fileName,   "_self", postBytes, "Content-Type: application/vnd.m?s-excel"); ReportViewHost.Child = ReportView;   _filename would be something like http://localhost/shared%20documents/myfile.xslsx Thanks for any suggestions. Rhonda

Possible bug in WebBrowser Control realization in WPF and Windows Phone 7

  
Hello, I'm tried to make authentication component for russian social network Vkontakte.ru (vk.com). In russian forum nobody answered me. The proplem: When authentication is complete WebBrowser component must be redirected to page like: http://vkontakte.ru/login_success.html#session={%22expire%22%3A%221272008089%22%2C%22mid%22%3A%22100172%22%2C%22secret%22%3A%229c8d8f0305%22%2C%22sid%22%3A%221131703552161ae352a1256402e3140d7cbde41b1602a93d15472c82%22} In Windows Form application all works normal. But in WPF browser was redirected to http://vkontakte.ru/login_success.html Without #session.... It happened not only in WPF Applications, but even in Windows Phone 7. It is a bug? Or this parameter can be accessed from another place?

how to write a code for browser compatible in asp.net 2.0

  
how to write a code for browser compatible in asp.net 2.0 How to write a code in asp.net for all browser compatible  

Pfobldm while printing from CR control in browser

  
Hi,      I am experiencing a problem while printing from CR viewer control from browser. Insted of printing report to printer whole web page gets printed. I am using VS2008 and FW 3.5 ASP.NET Nilkanth Desai  

Display a Web User Control in the Web Browser control of WinForms

  
Does anyone have an example of how to do this, or can you point me to a good tutorial that explains how to do this? Thanks

How to enable own shortcut within WebBrowser control in Windows form application

  

Hi, 

 

I am developing a windows form application with C#, where I have placed WebBrowser control... I load some web page in this webbrowser and I need to know, that after I press my own certain shortcut that it will allow me to call my handler...

It should work something like this => I have certain textbox on web page and after pressing my own shortcut, it will call my handler which will automatically type certain text (which will be prepared in that handler) into that textbox... 

Could you advice me, how to make this happen or if it is even possible?

 

Thanks a lot in advance


Ajax AsyncFileUpload control not working in IE7.0 and IE8.0 browser in Integrated Windows Authentica

  

Hi, 

I am facing problem using Ajax AsyncFileUpload control in IE7.0 and IE8.0 browsers. 

It is working fine in local environment, when you deploy the code in Windows Server 2003 (IIS6.0) with Integrated Windows Authentication mode it is not working properly in IE7.0 and IE8.0 browsers. 

Issue: 

I am doing the validation in client side using OnClientUploadStarted, OnClientUploadComplete it is working fine but once click on any other button (server side) getting the error Internet Explorer cannot display the webpage (Diagnose Connection Problem) in IE7.0 and IE8.0 browser. Same thing is working fine in other browsers.

WebBrowser control, svg and WIndows 7

  

Hi, I have a problem with a WebBrowser control using C# 2.0 showing svg content.

The problem is the following:

I have a simple Form with a WebBrowser control in it. the link that i try to load is this: http://www.croczilla.com/bits_and_pieces/svg/samples/arcs1/arcs1.svg (just an example)

If I execute it on Windows XP, the control displays the svg correctly, while on Vista and Windows 7 it shows a blank page... anyone can tell me why?

To show svg I have installed the adobe svg viewer and I have IE8 installed too

Of course if I navigate to that page using directly IE8 everything works.

Thanks in advance for your help


star

Setting trust level for windows.system.forms.browser control

  

Hi All,

I am using a browser control in my WPF application. The users of this application will be using this control for viewing content that could contain malicious scripts. I want to set the Trust Level so that none of the scripts should be executed. I have added the Attribute to the method that creates the Browser control. I dont think its working though. Any thoughts on how this can be done?

[

PermissionSet(SecurityAction.Assert, Name = "Nothing")]

 

public System.Windows.Forms.WebBrowser CreateBrowserControl(

WPF WebBrowser Control on x64 machines Launches new IE window instead of staying inside of control.

  

I have a WPF app that uses an embedded WebBrowser control.  I have been using this as a video player (i would have used MediaPlayer, but it doesn't support H.264 in XP)  Anyway, I am using a 3rd party video player to display the h.264 videos, and this has been working fine.

We started testing on 64 bit Windows 7 and now whenever we attempt to play the videos, the WebBrowser launches a separate IE window and plays the video there instead of within my app.

I have googled this bug and have seen hints about handling the NewWindow2 event, but have yet to see a decent example that isn't a total HACK..

Does anybody know a way to stop the WebBrowser control from launching separate IE windows on a 64 bit OS?

Thanks a lot,

Curtis


Setting trust level for windows.system.forms.browser control

  

Hi All,

I am using a browser control in my WPF application. The users of this application will be using this control for viewing content that could contain malicious scripts. I want to set the Trust Level so that none of the scripts should be executed. I have added the Attribute to the method that creates the Browser control. I dont think its working though. Any thoughts on how this can be done?

[

PermissionSet ( SecurityAction .Assert, Name = "Nothing" )]

 

public System.Windows.Forms.

Visual Studio WebBrowser control's PrintPreviewDialog generates "VSHost32.exe has stopped working"

  

I'm getting a problem with a VS 2008 application when I use the WebBrowser control's .ShowPrintPreviewDialog method and either print or close the dialog box.  I'm working on a 64-bit Windows 7 computer and using Visual Studio's default Debug option settings.  The problem happens both when running from the IDE in debug mode and after compiling in x86 mode as a stand-alone.

The control is central to as an otherwise effective report management system, so on btnPrint_Click I assign HTML code to .DocumentText and then call .ShowPrintPreviewDialog, which works fine, other than it does need 2 clicks so it seems both stages have to happen as separate events? 

Although when I go to print, the document prints okay, the print preview dialog form closes itself and whole program crashes with the above message.  I've also tried separating those stages to avoid the 2-click issue, but I still get the crash.

If I turn Project>Properties>Debug>"Enable unmanaged code debugging" ON, I get this message instead "Unhandled exception at 0x752c77df (urlmon.dll) in PMPos.exe: 0xC0000005: Access violation reading location 0x00000001."

The control's other print dialog methods work fine.   Is there a solution that I can rely on when distributing the application or am I best abondoning this particular

How to pass value from browser into embedded windows form control library

  

Hi all,


i have one project which i embed the windows form control library inside the web form.

now i wanna pass a url from aspx into my windows form control library.

May i know how to do this?


thanks.


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend