I am having a very weird problem that I cant find any solution on the Internet (after so many years!). I am trying to code a C# program and I am using the WebBroswer control.
The code is very simple. 1 button and 1 webbroswer control. When the button is clicked I want it to navigate to ebay.com
Expand|Select|Wrap|Line Numbers
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- namespace WindowsFormsApplication1
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- // This works!
- //webBrowser1.Navigate("http://www.google.com");
- // This generates "vshost has stopped working"
- webBrowser1.Navigate("http://www.ebay.com");
- }
- }
- }
If however i try google.com it works 100%.
Now for the strange part. Using the second version of the application that works (i.e. webBrowser1.Navigate("http://www.google.com"); ) I search for ebay using google and I manually navigate to ebay.com (meaning I am clicking on the search results link). IT WORKS 100% !
If anyone can help me I would be grateful. I cant find any other info on this problem. Thank you for reading