How can I open WebBrowser controller in visual Studio Browser?
My code
WebBrowser wb = new WebBrowser();
wb.Navigate("http://www.google.com");
wb.Show();
I use this code but I can’t open the browser in visual studio 2010
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Ajay, you need to add the control to form. Do like this:
But if you have already added web browser from the designer to your form, then you need not instantiate a new instance of browser in the code. Instead you just do:
There is no need of
.Show()unless you have hidden it previously.