0

I need to view a web page inside my application (developed using C# with Visual Studio 2010 and .NET 4.0), so I need to create a simple like browser. This browser can pass a value to system. I have tried CefSharp and webkit with no luck - I cannot load the assembly into Visual Studio.

How can I solve this problem?

Thanks.

3
  • 2
    Can't you use WebBrowser component? Commented Apr 11, 2011 at 10:18
  • 1
    Why not a WebBrowser Control? Commented Apr 11, 2011 at 10:18
  • possible duplicate of Best Way to Render HTML in WinForms application? Commented Apr 11, 2011 at 19:39

1 Answer 1

6

If this is WinForms, you should consider using the WebBrowser Class which embeds Internet Explorer as a user control.

WPF also has a similar webbrowser control defined like this:

<WebBrowser x:Name="wbMain" Margin="30"> </WebBrowser> 

Many scenarios are already covered in the .Net framework, and it's easier to use what comes with the framework before trying other things. That said, there are scenarios where you might want to use something other than the IE webbrowser control, but try the easy way first.

Sign up to request clarification or add additional context in comments.

8 Comments

+1. OP tries very unorthodox methods and totaly ignores what is arleady there.
is it possible to pass variable back to the system from webbrowser class?
Yes, you can access every DOM element on the web page and use it in your code.
i just try your solution, it's a good solution, but because of the webbrowser class use a IE as a browser, and my web application has been tested with Mozilla/chrome, i found a problem when viewed the web application.
fattah, Creating a webapp which doesn't work with all the defacto browsers in 2011 is bad practice imo. And it's not that hard to get html to work with IE7+, FireFox, Chrome and Safari. It's probably easier to fix the html, than to use another browser engine.
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.