I created a windows forms app with a browser control embedded. Actually, it is practically the code sample found in chapter 35 of this C# book, here:
http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764575341,descCd-download_code.html
Although, the webBrowser1_CanGoBack property does change, I can't seem to trigger the CanGoBackChanged event! Nothing outlandish here:
<code>
private void webBrowser1_CanGoBackChanged(object sender, EventArgs e)
{
buttonBack.Enabled = webBrowser1.CanGoBack;
}
</code>
Would anyone please concur that this feature is broken
-e
P.S. The only event that works regularly is "DocumentCompleted". The event "Navigating" also fails to fire.

webBrowser1_CanGoBackChanged event doesn't fire!?
wurriedbunny
I don't know. . . this works for me.
tennisguy
Thanks for reworking your code...some things like the includes (i.e. using's) aren't obvious to newbies. Also, you don't need to obfuscate your URL. I have visited that site before. Thanks.
-enrique
Evertone
I've noticed a few that were not working as expected with the WebBrowser Control, as well.
What I found in the past, attaching to the DOM events directly, by referencing the COM MsHtml library, has allowed me to overcome the problems.
Let me see if I can duplicate and if the DOM event works. . . give me an hour.
casaubon
what version of the framework are you running
sorry I left out the using statements -
yaron nahari
this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted);
so, I added these event handlers:
this.webBrowser1.CanGoBackChanged += new System.Windows.Forms.WebBrowserCanGoBackChangedEventHandler(this.webBrowser1_CanGoBackChanged);
this.webBrowser1.CanGoForwardChanged += new System. Windows.Forms.WebBrowserCanGoForwardChangedEventHandler(this.webBrowser1_CanGoForwardChanged);
But, these don't exist as valid event handlers! Following the sample, they logically should be valid. However, this is the format that does work:
this.webBrowser1.CanGoBackChanged += new
EventHandler(webBrowser1_CanGoBackChanged);
this.webBrowser1.CanGoForwardChanged += new
EventHandler(webBrowser1_CanGoForwardChanged);
-enrique