Click here to Skip to main content
15,609,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I using WebBrowser control in my winform application.

The url creating by my code works in Chrome,Firefox,Internet explorer,but not working in WebBrowser control.

My question is if problem in url then it shouldn't work in browsers also.Why it creating problem only in WebBrowser control?

What I have tried:

I tried below logic but not working.

webBrowser1.ScriptErrorsSuppressed = true;
webBrowser1.Navigate(new Uri(url));
Updated 16-May-16 3:27am
F-ES Sitecore 16-May-16 9:37am    
"Not working" means nothing, you'll have to explain what is actually happening when you run your code, does the browser not navigate, navigate but the page looks wrong, do you get errors etc etc.

1 solution

Try something like this!
WebBrowser wb = new WebBrowser();
wb.AllowNavigation = true;

Use it in
in a form's Load handler:

add this:

In form load you can add this... It will work..:)
WebBrowser1.Silent = True
Share this answer
Surendrasinh Rathod 16-May-16 9:38am    
Thanks.I try it..But not working.If I comment webBrowser1.ScriptErrorsSuppressed = true;

then i getting error message "Invalid Argument"
Santosh Kokatnur 16-May-16 9:54am    
Add above solution to your form load...

WebBrowser1.Silent = true;

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900